@@ -194,11 +194,6 @@ class AppBar extends StatefulWidget implements PreferredSizeWidget {
194194 this .shape,
195195 this .backgroundColor,
196196 this .foregroundColor,
197- @Deprecated (
198- 'This property is no longer used, please use systemOverlayStyle instead. '
199- 'This feature was deprecated after v2.4.0-0.0.pre.' ,
200- )
201- this .brightness,
202197 this .iconTheme,
203198 this .actionsIconTheme,
204199 this .primary = true ,
@@ -499,7 +494,7 @@ class AppBar extends StatefulWidget implements PreferredSizeWidget {
499494 /// If null, then the [AppBarTheme.backgroundColor] is used. If that value is also
500495 /// null, then [AppBar] uses the overall theme's [ColorScheme.primary] if the
501496 /// overall theme's brightness is [Brightness.light] , and [ColorScheme.surface]
502- /// if the overall theme's [ brightness] is [Brightness.dark] .
497+ /// if the overall theme's brightness is [Brightness.dark] .
503498 ///
504499 /// If this color is a [MaterialStateColor] it will be resolved against
505500 /// [MaterialState.scrolledUnder] when the content of the app's
@@ -525,7 +520,7 @@ class AppBar extends StatefulWidget implements PreferredSizeWidget {
525520 /// value is also null, then [AppBar] uses the overall theme's
526521 /// [ColorScheme.onPrimary] if the overall theme's brightness is
527522 /// [Brightness.light] , and [ColorScheme.onSurface] if the overall
528- /// theme's [ brightness] is [Brightness.dark] .
523+ /// theme's brightness is [Brightness.dark] .
529524 ///
530525 /// This color is used to configure [DefaultTextStyle] that contains
531526 /// the toolbar's children, and the default [IconTheme] widgets that
@@ -543,38 +538,6 @@ class AppBar extends StatefulWidget implements PreferredSizeWidget {
543538 /// is light or dark.
544539 final Color ? foregroundColor;
545540
546- /// {@template flutter.material.appbar.brightness}
547- /// This property is deprecated, please use [systemOverlayStyle] instead.
548- ///
549- /// Determines the brightness of the [SystemUiOverlayStyle] : for
550- /// [Brightness.dark] , [SystemUiOverlayStyle.light] is used and for
551- /// [Brightness.light] , [SystemUiOverlayStyle.dark] is used.
552- ///
553- /// If this value is null then [AppBarTheme.brightness] is used
554- /// and if that's null then overall theme's brightness is used.
555- ///
556- /// The AppBar is built within a `AnnotatedRegion<SystemUiOverlayStyle>`
557- /// which causes [SystemChrome.setSystemUIOverlayStyle] to be called
558- /// automatically. Apps should not enclose the AppBar with
559- /// their own [AnnotatedRegion] .
560- /// {@endtemplate}
561- ///
562- /// See also:
563- ///
564- /// * [Theme.of] , which returns the current overall Material theme as
565- /// a [ThemeData].
566- /// * [ThemeData.colorScheme] , the thirteen colors that most Material widget
567- /// default colors are based on.
568- /// * [ColorScheme.brightness] , which indicates if the overall [Theme]
569- /// is light or dark.
570- /// * [backwardsCompatibility] , which forces AppBar to use this
571- /// obsolete property.
572- @Deprecated (
573- 'This property is no longer used, please use systemOverlayStyle instead. '
574- 'This feature was deprecated after v2.4.0-0.0.pre.' ,
575- )
576- final Brightness ? brightness;
577-
578541 /// {@template flutter.material.appbar.iconTheme}
579542 /// The color, opacity, and size to use for toolbar icons.
580543 ///
@@ -692,8 +655,7 @@ class AppBar extends StatefulWidget implements PreferredSizeWidget {
692655 /// This property is deprecated and is false by default.
693656 ///
694657 /// If true, preserves the original defaults for the [backgroundColor] ,
695- /// [iconTheme] , [actionsIconTheme] properties, and the original use of
696- /// the [brightness] property.
658+ /// [iconTheme] , [actionsIconTheme] properties.
697659 ///
698660 /// If this property is null, then [AppBarTheme.backwardsCompatibility] of
699661 /// [ThemeData.appBarTheme] is used. If that is also null, the default
@@ -1212,11 +1174,9 @@ class _AppBarState extends State<AppBar> {
12121174 }
12131175
12141176 final SystemUiOverlayStyle overlayStyle = backwardsCompatibility
1215- ? _systemOverlayStyleForBrightness (
1216- widget.brightness
1217- ?? appBarTheme.brightness
1218- ?? ThemeData .estimateBrightnessForColor (backgroundColor),
1219- )
1177+ ? widget.systemOverlayStyle
1178+ ?? appBarTheme.systemOverlayStyle
1179+ ?? _systemOverlayStyleForBrightness (ThemeData .estimateBrightnessForColor (backgroundColor))
12201180 : widget.systemOverlayStyle
12211181 ?? appBarTheme.systemOverlayStyle
12221182 ?? defaults.systemOverlayStyle
@@ -1269,7 +1229,6 @@ class _SliverAppBarDelegate extends SliverPersistentHeaderDelegate {
12691229 required this .forceElevated,
12701230 required this .backgroundColor,
12711231 required this .foregroundColor,
1272- required this .brightness,
12731232 required this .iconTheme,
12741233 required this .actionsIconTheme,
12751234 required this .primary,
@@ -1309,7 +1268,6 @@ class _SliverAppBarDelegate extends SliverPersistentHeaderDelegate {
13091268 final bool forceElevated;
13101269 final Color ? backgroundColor;
13111270 final Color ? foregroundColor;
1312- final Brightness ? brightness;
13131271 final IconThemeData ? iconTheme;
13141272 final IconThemeData ? actionsIconTheme;
13151273 final bool primary;
@@ -1385,7 +1343,6 @@ class _SliverAppBarDelegate extends SliverPersistentHeaderDelegate {
13851343 surfaceTintColor: surfaceTintColor,
13861344 backgroundColor: backgroundColor,
13871345 foregroundColor: foregroundColor,
1388- brightness: brightness,
13891346 iconTheme: iconTheme,
13901347 actionsIconTheme: actionsIconTheme,
13911348 primary: primary,
@@ -1420,7 +1377,6 @@ class _SliverAppBarDelegate extends SliverPersistentHeaderDelegate {
14201377 || shadowColor != oldDelegate.shadowColor
14211378 || backgroundColor != oldDelegate.backgroundColor
14221379 || foregroundColor != oldDelegate.foregroundColor
1423- || brightness != oldDelegate.brightness
14241380 || iconTheme != oldDelegate.iconTheme
14251381 || actionsIconTheme != oldDelegate.actionsIconTheme
14261382 || primary != oldDelegate.primary
@@ -1555,11 +1511,6 @@ class SliverAppBar extends StatefulWidget {
15551511 this .forceElevated = false ,
15561512 this .backgroundColor,
15571513 this .foregroundColor,
1558- @Deprecated (
1559- 'This property is no longer used, please use systemOverlayStyle instead. '
1560- 'This feature was deprecated after v2.4.0-0.0.pre.' ,
1561- )
1562- this .brightness,
15631514 this .iconTheme,
15641515 this .actionsIconTheme,
15651516 this .primary = true ,
@@ -1865,15 +1816,6 @@ class SliverAppBar extends StatefulWidget {
18651816 /// This property is used to configure an [AppBar] .
18661817 final Color ? foregroundColor;
18671818
1868- /// {@macro flutter.material.appbar.brightness}
1869- ///
1870- /// This property is used to configure an [AppBar] .
1871- @Deprecated (
1872- 'This property is no longer used, please use systemOverlayStyle instead. '
1873- 'This feature was deprecated after v2.4.0-0.0.pre.' ,
1874- )
1875- final Brightness ? brightness;
1876-
18771819 /// {@macro flutter.material.appbar.iconTheme}
18781820 ///
18791821 /// This property is used to configure an [AppBar] .
@@ -2149,7 +2091,6 @@ class _SliverAppBarState extends State<SliverAppBar> with TickerProviderStateMix
21492091 forceElevated: widget.forceElevated,
21502092 backgroundColor: widget.backgroundColor,
21512093 foregroundColor: widget.foregroundColor,
2152- brightness: widget.brightness,
21532094 iconTheme: widget.iconTheme,
21542095 actionsIconTheme: widget.actionsIconTheme,
21552096 primary: widget.primary,
0 commit comments