From 93fb5829b88c56ffb794e5a85680f9b891b52474 Mon Sep 17 00:00:00 2001 From: Taha Tesser Date: Tue, 4 Feb 2025 21:21:06 +0200 Subject: [PATCH] Update `year2023` flag deprecation message (#162607) Fixes [Improve `year2023` flag deprecation message](https://github.com/flutter/flutter/issues/162606) ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant documentation (doc comments with `///`). - [ ] I added new tests to check the change I am making, or this PR is [test-exempt]. - [ ] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-new channel on [Discord]. [Contributor Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview [Tree Hygiene]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md [test-exempt]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests [Flutter Style Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md [Features we expect every widget to implement]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement [CLA]: https://cla.developers.google.com/ [flutter/tests]: https://github.com/flutter/tests [breaking change policy]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md [Data Driven Fixes]: https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md --- .../lib/src/material/progress_indicator.dart | 15 ++++++++++----- .../src/material/progress_indicator_theme.dart | 6 ++++-- packages/flutter/lib/src/material/slider.dart | 6 ++++-- .../flutter/lib/src/material/slider_theme.dart | 6 ++++-- 4 files changed, 22 insertions(+), 11 deletions(-) diff --git a/packages/flutter/lib/src/material/progress_indicator.dart b/packages/flutter/lib/src/material/progress_indicator.dart index 8b3fc5dce3..03d0679a85 100644 --- a/packages/flutter/lib/src/material/progress_indicator.dart +++ b/packages/flutter/lib/src/material/progress_indicator.dart @@ -343,7 +343,8 @@ class LinearProgressIndicator extends ProgressIndicator { this.stopIndicatorRadius, this.trackGap, @Deprecated( - 'Use ProgressIndicatorTheme to customize the ProgressIndicator appearance. ' + 'Set this flag to false to opt into the 2024 progress indicator appearance. Defaults to true. ' + 'In the future, this flag will default to false. Use ProgressIndicatorThemeData to customize individual properties. ' 'This feature was deprecated after v3.26.0-0.1.pre.', ) this.year2023, @@ -420,7 +421,8 @@ class LinearProgressIndicator extends ProgressIndicator { /// /// If [ThemeData.useMaterial3] is false, then this property is ignored. @Deprecated( - 'Use ProgressIndicatorTheme to customize the ProgressIndicator appearance. ' + 'Set this flag to false to opt into the 2024 progress indicator appearance. Defaults to true. ' + 'In the future, this flag will default to false. Use ProgressIndicatorThemeData to customize individual properties. ' 'This feature was deprecated after v3.27.0-0.1.pre.', ) final bool? year2023; @@ -719,7 +721,8 @@ class CircularProgressIndicator extends ProgressIndicator { this.constraints, this.trackGap, @Deprecated( - 'Use ProgressIndicatorTheme to customize the ProgressIndicator appearance. ' + 'Set this flag to false to opt into the 2024 progress indicator appearance. Defaults to true. ' + 'In the future, this flag will default to false. Use ProgressIndicatorThemeData to customize individual properties. ' 'This feature was deprecated after v3.27.0-0.1.pre.', ) this.year2023, @@ -749,7 +752,8 @@ class CircularProgressIndicator extends ProgressIndicator { this.constraints, this.trackGap, @Deprecated( - 'Use ProgressIndicatorTheme to customize the ProgressIndicator appearance. ' + 'Set this flag to false to opt into the 2024 progress indicator appearance. Defaults to true. ' + 'In the future, this flag will default to false. Use ProgressIndicatorThemeData to customize individual properties. ' 'This feature was deprecated after v3.27.0-0.2.pre.', ) this.year2023, @@ -832,7 +836,8 @@ class CircularProgressIndicator extends ProgressIndicator { /// /// If [ThemeData.useMaterial3] is false, then this property is ignored. @Deprecated( - 'Use ProgressIndicatorTheme to customize the ProgressIndicator appearance. ' + 'Set this flag to false to opt into the 2024 progress indicator appearance. Defaults to true. ' + 'In the future, this flag will default to false. Use ProgressIndicatorThemeData to customize individual properties. ' 'This feature was deprecated after v3.27.0-0.2.pre.', ) final bool? year2023; diff --git a/packages/flutter/lib/src/material/progress_indicator_theme.dart b/packages/flutter/lib/src/material/progress_indicator_theme.dart index 71c709dac3..91f752221e 100644 --- a/packages/flutter/lib/src/material/progress_indicator_theme.dart +++ b/packages/flutter/lib/src/material/progress_indicator_theme.dart @@ -49,7 +49,8 @@ class ProgressIndicatorThemeData with Diagnosticable { this.trackGap, this.circularTrackPadding, @Deprecated( - 'Use ProgressIndicatorTheme to customize the ProgressIndicator appearance. ' + 'Set this flag to false to opt into the 2024 progress indicator appearance. Defaults to true. ' + 'In the future, this flag will default to false. Use ProgressIndicatorThemeData to customize individual properties. ' 'This feature was deprecated after v3.27.0-0.2.pre.', ) this.year2023, @@ -131,7 +132,8 @@ class ProgressIndicatorThemeData with Diagnosticable { /// /// If [ThemeData.useMaterial3] is false, then this property is ignored. @Deprecated( - 'Use ProgressIndicatorTheme to customize the ProgressIndicator appearance. ' + 'Set this flag to false to opt into the 2024 progress indicator appearance. Defaults to true. ' + 'In the future, this flag will default to false. Use ProgressIndicatorThemeData to customize individual properties. ' 'This feature was deprecated after v3.27.0-0.2.pre.', ) final bool? year2023; diff --git a/packages/flutter/lib/src/material/slider.dart b/packages/flutter/lib/src/material/slider.dart index f62e0522b2..d78137a59a 100644 --- a/packages/flutter/lib/src/material/slider.dart +++ b/packages/flutter/lib/src/material/slider.dart @@ -239,7 +239,8 @@ class Slider extends StatefulWidget { this.autofocus = false, this.allowedInteraction, @Deprecated( - 'Use SliderTheme to customize the Slider appearance. ' + 'Set this flag to false to opt into the 2024 slider appearance. Defaults to true. ' + 'In the future, this flag will default to false. Use SliderThemeData to customize individual properties. ' 'This feature was deprecated after v3.27.0-0.1.pre.', ) this.year2023, @@ -573,7 +574,8 @@ class Slider extends StatefulWidget { /// /// If [ThemeData.useMaterial3] is false, then this property is ignored. @Deprecated( - 'Use SliderTheme to customize the Slider appearance. ' + 'Set this flag to false to opt into the 2024 slider appearance. Defaults to true. ' + 'In the future, this flag will default to false. Use SliderThemeData to customize individual properties. ' 'This feature was deprecated after v3.27.0-0.1.pre.', ) final bool? year2023; diff --git a/packages/flutter/lib/src/material/slider_theme.dart b/packages/flutter/lib/src/material/slider_theme.dart index 934ef26382..a4b3bef53c 100644 --- a/packages/flutter/lib/src/material/slider_theme.dart +++ b/packages/flutter/lib/src/material/slider_theme.dart @@ -298,7 +298,8 @@ class SliderThemeData with Diagnosticable { this.thumbSize, this.trackGap, @Deprecated( - 'Use SliderTheme to customize the Slider appearance. ' + 'Set this flag to false to opt into the 2024 slider appearance. Defaults to true. ' + 'In the future, this flag will default to false. Use SliderThemeData to customize individual properties. ' 'This feature was deprecated after v3.27.0-0.2.pre.', ) this.year2023, @@ -637,7 +638,8 @@ class SliderThemeData with Diagnosticable { /// /// If [ThemeData.useMaterial3] is false, then this property is ignored. @Deprecated( - 'Use SliderTheme to customize the Slider appearance. ' + 'Set this flag to false to opt into the 2024 slider appearance. Defaults to true. ' + 'In the future, this flag will default to false. Use SliderThemeData to customize individual properties. ' 'This feature was deprecated after v3.27.0-0.2.pre.', ) final bool? year2023;