@@ -233,9 +233,17 @@ class AppBar extends StatefulWidget implements PreferredSizeWidget {
233233 this .shape,
234234 this .backgroundColor,
235235 this .foregroundColor,
236+ @Deprecated (
237+ 'This property is no longer used, please use systemOverlayStyle instead. '
238+ 'This feature was deprecated after v2.4.0-0.0.pre.' ,
239+ )
236240 this .brightness,
237241 this .iconTheme,
238242 this .actionsIconTheme,
243+ @Deprecated (
244+ 'This property is no longer used, please use toolbarTextStyle and titleTextStyle instead. '
245+ 'This feature was deprecated after v2.4.0-0.0.pre.' ,
246+ )
239247 this .textTheme,
240248 this .primary = true ,
241249 this .centerTitle,
@@ -245,6 +253,10 @@ class AppBar extends StatefulWidget implements PreferredSizeWidget {
245253 this .bottomOpacity = 1.0 ,
246254 this .toolbarHeight,
247255 this .leadingWidth,
256+ @Deprecated (
257+ 'This property is obsolete and is false by default. '
258+ 'This feature was deprecated after v2.4.0-0.0.pre.' ,
259+ )
248260 this .backwardsCompatibility,
249261 this .toolbarTextStyle,
250262 this .titleTextStyle,
@@ -523,7 +535,7 @@ class AppBar extends StatefulWidget implements PreferredSizeWidget {
523535 final Color ? foregroundColor;
524536
525537 /// {@template flutter.material.appbar.brightness}
526- /// This property is obsolete , please use [systemOverlayStyle] instead.
538+ /// This property is deprecated , please use [systemOverlayStyle] instead.
527539 ///
528540 /// Determines the brightness of the [SystemUiOverlayStyle] : for
529541 /// [Brightness.dark] , [SystemUiOverlayStyle.light] is used and fo
@@ -548,6 +560,10 @@ class AppBar extends StatefulWidget implements PreferredSizeWidget {
548560 /// is light or dark.
549561 /// * [backwardsCompatibility] , which forces AppBar to use this
550562 /// obsolete property.
563+ @Deprecated (
564+ 'This property is no longer used, please use systemOverlayStyle instead. '
565+ 'This feature was deprecated after v2.4.0-0.0.pre.' ,
566+ )
551567 final Brightness ? brightness;
552568
553569 /// {@template flutter.material.appbar.iconTheme}
@@ -583,13 +599,20 @@ class AppBar extends StatefulWidget implements PreferredSizeWidget {
583599 final IconThemeData ? actionsIconTheme;
584600
585601 /// {@template flutter.material.appbar.textTheme}
602+ /// This property is deprecated, please use [toolbarTextStyle] and
603+ /// [titleTextStyle] instead.
604+ ///
586605 /// The typographic styles to use for text in the app bar. Typically this is
587- /// set along with [brightness] [ backgroundColor] , [iconTheme] .
606+ /// set along with [backgroundColor] , [iconTheme] .
588607 ///
589608 /// If this property is null, then [AppBarTheme.textTheme] of
590609 /// [ThemeData.appBarTheme] is used. If that is also null, then
591610 /// [ThemeData.primaryTextTheme] is used.
592611 /// {@endtemplate}
612+ @Deprecated (
613+ 'This property is no longer used, please use toolbarTextStyle and titleTextStyle instead. '
614+ 'This feature was deprecated after v2.4.0-0.0.pre.' ,
615+ )
593616 final TextTheme ? textTheme;
594617
595618 /// {@template flutter.material.appbar.primary}
@@ -674,21 +697,25 @@ class AppBar extends StatefulWidget implements PreferredSizeWidget {
674697 final double ? leadingWidth;
675698
676699 /// {@template flutter.material.appbar.backwardsCompatibility}
700+ /// This property is deprecated and is false by default.
701+ ///
677702 /// If true, preserves the original defaults for the [backgroundColor] ,
678703 /// [iconTheme] , [actionsIconTheme] properties, and the original use of
679704 /// the [textTheme] and [brightness] properties.
680705 ///
681706 /// If this property is null, then [AppBarTheme.backwardsCompatibility] of
682707 /// [ThemeData.appBarTheme] is used. If that is also null, the default
683- /// value is true.
684- ///
685- /// This is a temporary property. When setting it to false is no
686- /// longer considered a breaking change, it will be deprecated and
687- /// its default value will be changed to false. App developers are
688- /// encouraged to opt into the new features by setting it to false
689- /// and using the [foregroundColor] and [systemOverlayStyle]
690- /// properties as needed.
708+ /// value is false.
709+ ///
710+ /// This is a temporary property and it has been deprecated. App
711+ /// developers are encouraged to opt into the new features by
712+ /// leaving it default (false) and using the [foregroundColor] and
713+ /// [systemOverlayStyle] properties as needed.
691714 /// {@endtemplate}
715+ @Deprecated (
716+ 'This property is obsolete and is false by default. '
717+ 'This feature was deprecated after v2.4.0-0.0.pre.' ,
718+ )
692719 final bool ? backwardsCompatibility;
693720
694721 /// {@template flutter.material.appbar.toolbarTextStyle}
@@ -729,7 +756,7 @@ class AppBar extends StatefulWidget implements PreferredSizeWidget {
729756 /// {@template flutter.material.appbar.systemOverlayStyle}
730757 /// Specifies the style to use for the system overlays that overlap the AppBar.
731758 ///
732- /// This property is only used if [backwardsCompatibility] is set to false .
759+ /// This property is only used if [backwardsCompatibility] is false (the default) .
733760 ///
734761 /// If this property is null, then [AppBarTheme.systemOverlayStyle] of
735762 /// [ThemeData.appBarTheme] is used. If that is also null, an appropriate
@@ -848,7 +875,7 @@ class _AppBarState extends State<AppBar> {
848875 final bool useCloseButton = parentRoute is PageRoute <dynamic > && parentRoute.fullscreenDialog;
849876
850877 final double toolbarHeight = widget.toolbarHeight ?? appBarTheme.toolbarHeight ?? kToolbarHeight;
851- final bool backwardsCompatibility = widget.backwardsCompatibility ?? appBarTheme.backwardsCompatibility ?? true ;
878+ final bool backwardsCompatibility = widget.backwardsCompatibility ?? appBarTheme.backwardsCompatibility ?? false ;
852879
853880 final Color backgroundColor = backwardsCompatibility
854881 ? widget.backgroundColor
@@ -1513,9 +1540,17 @@ class SliverAppBar extends StatefulWidget {
15131540 this .forceElevated = false ,
15141541 this .backgroundColor,
15151542 this .foregroundColor,
1543+ @Deprecated (
1544+ 'This property is no longer used, please use systemOverlayStyle instead. '
1545+ 'This feature was deprecated after v2.4.0-0.0.pre.' ,
1546+ )
15161547 this .brightness,
15171548 this .iconTheme,
15181549 this .actionsIconTheme,
1550+ @Deprecated (
1551+ 'This property is no longer used, please use toolbarTextStyle and titleTextStyle instead. '
1552+ 'This feature was deprecated after v2.4.0-0.0.pre.' ,
1553+ )
15191554 this .textTheme,
15201555 this .primary = true ,
15211556 this .centerTitle,
@@ -1613,6 +1648,10 @@ class SliverAppBar extends StatefulWidget {
16131648 /// {@macro flutter.material.appbar.brightness}
16141649 ///
16151650 /// This property is used to configure an [AppBar] .
1651+ @Deprecated (
1652+ 'This property is no longer used, please use systemOverlayStyle instead. '
1653+ 'This feature was deprecated after v2.4.0-0.0.pre.' ,
1654+ )
16161655 final Brightness ? brightness;
16171656
16181657 /// {@macro flutter.material.appbar.iconTheme}
@@ -1628,6 +1667,10 @@ class SliverAppBar extends StatefulWidget {
16281667 /// {@macro flutter.material.appbar.textTheme}
16291668 ///
16301669 /// This property is used to configure an [AppBar] .
1670+ @Deprecated (
1671+ 'This property is no longer used, please use toolbarTextStyle and titleTextStyle instead. '
1672+ 'This feature was deprecated after v2.4.0-0.0.pre.' ,
1673+ )
16311674 final TextTheme ? textTheme;
16321675
16331676 /// {@macro flutter.material.appbar.primary}
0 commit comments