From fc35ecb38f64104f3ea4cf2fa4036612494a5d33 Mon Sep 17 00:00:00 2001 From: Albert Wolszon Date: Thu, 26 Mar 2026 16:14:05 +0100 Subject: [PATCH 1/2] Clarify ListTile error reporting in colored widget Updated the title and description to clarify that ListTile reports an error in debug mode when wrapped in a colored widget instead of throwing an exception. --- .../breaking-changes/list-tile-color-warning.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/content/release/breaking-changes/list-tile-color-warning.md b/src/content/release/breaking-changes/list-tile-color-warning.md index 16e3b8cbc2..fb16431886 100644 --- a/src/content/release/breaking-changes/list-tile-color-warning.md +++ b/src/content/release/breaking-changes/list-tile-color-warning.md @@ -1,16 +1,16 @@ --- -title: ListTile throws exception when wrapped in a colored widget +title: ListTile reports error in debug when wrapped in a colored widget description: >- - ListTile throws an exception when it is wrapped in an intermediate - widget with a non-transparent background color. + ListTile reports an error in debug mode when it is wrapped in + an intermediate widget with a non-transparent background color. --- ## Summary When a `ListTile` is wrapped in a widget with a non-transparent background color (such as a `Container` or `ColoredBox` with a color specified) that sits between -the `ListTile` and its nearest `Material` ancestor, the framework now throws an -exception. +the `ListTile` and its nearest `Material` ancestor, the framework now reports an +error. ## Background @@ -21,7 +21,7 @@ them invisible to the user. To prevent developers from accidentally introducing this bug and wondering why the background or ink splash effects on the `ListTile` are not displaying, an -assert was introduced. This exception explicitly points out the issue during +assert was introduced. This error explicitly points out the issue during development. If your code has an intermediate colored widget between a `ListTile` and a @@ -38,7 +38,7 @@ Container. ## Migration guide -To fix the exception, follow the exception's hint and either remove the +To fix the error, follow the error's hint and either remove the background color from the intermediate widget, or wrap the `ListTile` in its own `Material` widget. From 91cc156ce564fc5fd13f9608ed4a224330047369 Mon Sep 17 00:00:00 2001 From: Albert221 Date: Thu, 26 Mar 2026 16:39:07 +0100 Subject: [PATCH 2/2] Update index page title --- src/content/release/breaking-changes/index.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/content/release/breaking-changes/index.md b/src/content/release/breaking-changes/index.md index 17c7c486e4..c954032b0e 100644 --- a/src/content/release/breaking-changes/index.md +++ b/src/content/release/breaking-changes/index.md @@ -40,7 +40,7 @@ They're sorted by release and listed in alphabetical order: * [Deprecate `onReorder` callback][] * [Deprecated `cacheExtent` and `cacheExtentStyle`][] * [Deprecate `TextInputConnection.setStyle`][] -* [ListTile throws exception when wrapped in a colored widget][] +* [ListTile reports error in debug when wrapped in a colored widget][] * [Migrating Flutter Android app to Android Gradle Plugin 9.0.0][] * [Page transition builders reorganization][] @@ -48,7 +48,7 @@ They're sorted by release and listed in alphabetical order: [Deprecate `onReorder` callback]: /release/breaking-changes/deprecate-onreorder-callback [Deprecated `cacheExtent` and `cacheExtentStyle`]: /release/breaking-changes/scroll-cache-extent [Deprecate `TextInputConnection.setStyle`]: /release/breaking-changes/deprecate-text-input-connection-set-style -[ListTile throws exception when wrapped in a colored widget]: /release/breaking-changes/list-tile-color-warning +[ListTile reports error in debug when wrapped in a colored widget]: /release/breaking-changes/list-tile-color-warning [Migrating Flutter Android app to Android Gradle Plugin 9.0.0]: /release/breaking-changes/migrate-to-agp-9 [Page transition builders reorganization]: /release/breaking-changes/decouple-page-transition-builders