Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions packages/material_ui/lib/src/text_field.dart
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,15 @@ class TextField extends StatefulWidget {
/// By default, draws a horizontal line under the text field but can be
/// configured to show an icon, label, hint text, and error text.
///
/// This decoration does not replace the ambient [InputDecorationTheme].
/// Instead, it is merged with it by [InputDecoration.applyDefaults]. Only the
/// properties that are left null here take their value from the
/// [InputDecorationThemeData] returned by [InputDecorationTheme.of], which in
/// turn defaults to [ThemeData.inputDecorationTheme]. So, for example, when
/// the theme specifies a border, passing an [InputDecoration] that leaves
/// [InputDecoration.border] null does not remove that border; pass
/// [InputBorder.none] to opt out of it explicitly.
///
/// Specify null to remove the decoration entirely (including the
/// extra padding introduced by the decoration to save space for the labels).
final InputDecoration? decoration;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
changelog: |
- Documents that `TextField.decoration` is merged with the ambient
`InputDecorationTheme` rather than replacing it.
version: patch