From 3386d26a94f0004973f57faf2044842a03b4b721 Mon Sep 17 00:00:00 2001 From: Treamz Date: Tue, 18 Aug 2026 16:03:32 +0200 Subject: [PATCH 1/3] [material_ui] Document that TextField.decoration is merged with InputDecorationTheme TextField.decoration's dartdoc did not mention that the decoration passed here is combined with the ambient InputDecorationTheme via InputDecoration.applyDefaults, rather than replacing it. That makes it non-obvious why, for example, a theme-provided border survives an InputDecoration that simply omits one. Document the merge and point at the explicit opt-out. Addresses the documentation half of https://github.com/flutter/flutter/issues/159629 --- packages/material_ui/CHANGELOG.md | 5 +++++ packages/material_ui/lib/src/text_field.dart | 8 ++++++++ packages/material_ui/pubspec.yaml | 2 +- 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/packages/material_ui/CHANGELOG.md b/packages/material_ui/CHANGELOG.md index d8fa47e0d4be..b4841cb47ff0 100644 --- a/packages/material_ui/CHANGELOG.md +++ b/packages/material_ui/CHANGELOG.md @@ -1,3 +1,8 @@ +## 1.0.1 + +- Documents that `TextField.decoration` is merged with the ambient + `InputDecorationTheme` rather than replacing it. + ## 1.0.0 - README updated for the full release of material_ui. diff --git a/packages/material_ui/lib/src/text_field.dart b/packages/material_ui/lib/src/text_field.dart index 7e3ff9146ac6..b80c90d84839 100644 --- a/packages/material_ui/lib/src/text_field.dart +++ b/packages/material_ui/lib/src/text_field.dart @@ -449,6 +449,14 @@ 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], it is + /// merged with it by [InputDecoration.applyDefaults]. Only the properties + /// that are left null here take their value from [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 `border: 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; diff --git a/packages/material_ui/pubspec.yaml b/packages/material_ui/pubspec.yaml index 74627a0b025a..6a574dabded0 100644 --- a/packages/material_ui/pubspec.yaml +++ b/packages/material_ui/pubspec.yaml @@ -1,6 +1,6 @@ name: material_ui description: The official Flutter Material UI Library, implementing Google's Material Design design system. -version: 1.0.0 +version: 1.0.1 repository: https://github.com/flutter/packages/tree/main/packages/material_ui issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A%20material%20design%22 From 3fa82e738e3a6a0f1025b39c46dd8266be5c1ad0 Mon Sep 17 00:00:00 2001 From: Treamz Date: Tue, 18 Aug 2026 16:07:35 +0200 Subject: [PATCH 2/3] Address review: fix comma splice, name InputDecorationThemeData, link InputBorder.none --- packages/material_ui/lib/src/text_field.dart | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/packages/material_ui/lib/src/text_field.dart b/packages/material_ui/lib/src/text_field.dart index b80c90d84839..b8c6ac5ac6c1 100644 --- a/packages/material_ui/lib/src/text_field.dart +++ b/packages/material_ui/lib/src/text_field.dart @@ -449,13 +449,14 @@ 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], it is - /// merged with it by [InputDecoration.applyDefaults]. Only the properties - /// that are left null here take their value from [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 `border: InputBorder.none` to opt out of it explicitly. + /// 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). From 5da34404ed79b6cc213bba2648598af11a1c619a Mon Sep 17 00:00:00 2001 From: Treamz Date: Tue, 18 Aug 2026 16:16:04 +0200 Subject: [PATCH 3/3] Use batch-release pending changelog instead of editing CHANGELOG/pubspec material_ui sets 'release: batch: true' in ci_config.yaml, so the version and changelog validator rejects direct edits to CHANGELOG.md and to the pubspec version. Revert both and add a pending_changelogs entry instead. --- packages/material_ui/CHANGELOG.md | 5 ----- .../change_2026_08_18_text_field_decoration_docs.yaml | 4 ++++ packages/material_ui/pubspec.yaml | 2 +- 3 files changed, 5 insertions(+), 6 deletions(-) create mode 100644 packages/material_ui/pending_changelogs/change_2026_08_18_text_field_decoration_docs.yaml diff --git a/packages/material_ui/CHANGELOG.md b/packages/material_ui/CHANGELOG.md index b4841cb47ff0..d8fa47e0d4be 100644 --- a/packages/material_ui/CHANGELOG.md +++ b/packages/material_ui/CHANGELOG.md @@ -1,8 +1,3 @@ -## 1.0.1 - -- Documents that `TextField.decoration` is merged with the ambient - `InputDecorationTheme` rather than replacing it. - ## 1.0.0 - README updated for the full release of material_ui. diff --git a/packages/material_ui/pending_changelogs/change_2026_08_18_text_field_decoration_docs.yaml b/packages/material_ui/pending_changelogs/change_2026_08_18_text_field_decoration_docs.yaml new file mode 100644 index 000000000000..0dc79742042a --- /dev/null +++ b/packages/material_ui/pending_changelogs/change_2026_08_18_text_field_decoration_docs.yaml @@ -0,0 +1,4 @@ +changelog: | + - Documents that `TextField.decoration` is merged with the ambient + `InputDecorationTheme` rather than replacing it. +version: patch diff --git a/packages/material_ui/pubspec.yaml b/packages/material_ui/pubspec.yaml index 6a574dabded0..74627a0b025a 100644 --- a/packages/material_ui/pubspec.yaml +++ b/packages/material_ui/pubspec.yaml @@ -1,6 +1,6 @@ name: material_ui description: The official Flutter Material UI Library, implementing Google's Material Design design system. -version: 1.0.1 +version: 1.0.0 repository: https://github.com/flutter/packages/tree/main/packages/material_ui issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A%20material%20design%22