Unverified Commit 3eca034f authored by Hans Muller's avatar Hans Muller Committed by GitHub

AppBar.backwardsCompatibility now default false, deprecated (#86198)

parent 6a51e0c2
...@@ -341,7 +341,6 @@ class _BackdropState extends State<Backdrop> with SingleTickerProviderStateMixin ...@@ -341,7 +341,6 @@ class _BackdropState extends State<Backdrop> with SingleTickerProviderStateMixin
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
final AppBar appBar = AppBar( final AppBar appBar = AppBar(
brightness: Brightness.light,
elevation: 0.0, elevation: 0.0,
titleSpacing: 0.0, titleSpacing: 0.0,
title: _BackdropTitle( title: _BackdropTitle(
......
...@@ -29,7 +29,6 @@ class _LoginPageState extends State<LoginPage> { ...@@ -29,7 +29,6 @@ class _LoginPageState extends State<LoginPage> {
appBar: AppBar( appBar: AppBar(
elevation: 0.0, elevation: 0.0,
backgroundColor: Colors.white, backgroundColor: Colors.white,
brightness: Brightness.light,
leading: IconButton( leading: IconButton(
icon: const BackButtonIcon(), icon: const BackButtonIcon(),
tooltip: MaterialLocalizations.of(context).backButtonTooltip, tooltip: MaterialLocalizations.of(context).backButtonTooltip,
......
...@@ -233,9 +233,17 @@ class AppBar extends StatefulWidget implements PreferredSizeWidget { ...@@ -233,9 +233,17 @@ class AppBar extends StatefulWidget implements PreferredSizeWidget {
this.shape, this.shape,
this.backgroundColor, this.backgroundColor,
this.foregroundColor, this.foregroundColor,
@Deprecated(
'This property is no longer used, please use systemOverlayStyle instead. '
'This feature was deprecated after v2.4.0-0.0.pre.',
)
this.brightness, this.brightness,
this.iconTheme, this.iconTheme,
this.actionsIconTheme, this.actionsIconTheme,
@Deprecated(
'This property is no longer used, please use toolbarTextStyle and titleTextStyle instead. '
'This feature was deprecated after v2.4.0-0.0.pre.',
)
this.textTheme, this.textTheme,
this.primary = true, this.primary = true,
this.centerTitle, this.centerTitle,
...@@ -245,6 +253,10 @@ class AppBar extends StatefulWidget implements PreferredSizeWidget { ...@@ -245,6 +253,10 @@ class AppBar extends StatefulWidget implements PreferredSizeWidget {
this.bottomOpacity = 1.0, this.bottomOpacity = 1.0,
this.toolbarHeight, this.toolbarHeight,
this.leadingWidth, this.leadingWidth,
@Deprecated(
'This property is obsolete and is false by default. '
'This feature was deprecated after v2.4.0-0.0.pre.',
)
this.backwardsCompatibility, this.backwardsCompatibility,
this.toolbarTextStyle, this.toolbarTextStyle,
this.titleTextStyle, this.titleTextStyle,
...@@ -523,7 +535,7 @@ class AppBar extends StatefulWidget implements PreferredSizeWidget { ...@@ -523,7 +535,7 @@ class AppBar extends StatefulWidget implements PreferredSizeWidget {
final Color? foregroundColor; final Color? foregroundColor;
/// {@template flutter.material.appbar.brightness} /// {@template flutter.material.appbar.brightness}
/// This property is obsolete, please use [systemOverlayStyle] instead. /// This property is deprecated, please use [systemOverlayStyle] instead.
/// ///
/// Determines the brightness of the [SystemUiOverlayStyle]: for /// Determines the brightness of the [SystemUiOverlayStyle]: for
/// [Brightness.dark], [SystemUiOverlayStyle.light] is used and fo /// [Brightness.dark], [SystemUiOverlayStyle.light] is used and fo
...@@ -548,6 +560,10 @@ class AppBar extends StatefulWidget implements PreferredSizeWidget { ...@@ -548,6 +560,10 @@ class AppBar extends StatefulWidget implements PreferredSizeWidget {
/// is light or dark. /// is light or dark.
/// * [backwardsCompatibility], which forces AppBar to use this /// * [backwardsCompatibility], which forces AppBar to use this
/// obsolete property. /// obsolete property.
@Deprecated(
'This property is no longer used, please use systemOverlayStyle instead. '
'This feature was deprecated after v2.4.0-0.0.pre.',
)
final Brightness? brightness; final Brightness? brightness;
/// {@template flutter.material.appbar.iconTheme} /// {@template flutter.material.appbar.iconTheme}
...@@ -583,13 +599,20 @@ class AppBar extends StatefulWidget implements PreferredSizeWidget { ...@@ -583,13 +599,20 @@ class AppBar extends StatefulWidget implements PreferredSizeWidget {
final IconThemeData? actionsIconTheme; final IconThemeData? actionsIconTheme;
/// {@template flutter.material.appbar.textTheme} /// {@template flutter.material.appbar.textTheme}
/// This property is deprecated, please use [toolbarTextStyle] and
/// [titleTextStyle] instead.
///
/// The typographic styles to use for text in the app bar. Typically this is /// The typographic styles to use for text in the app bar. Typically this is
/// set along with [brightness] [backgroundColor], [iconTheme]. /// set along with [backgroundColor], [iconTheme].
/// ///
/// If this property is null, then [AppBarTheme.textTheme] of /// If this property is null, then [AppBarTheme.textTheme] of
/// [ThemeData.appBarTheme] is used. If that is also null, then /// [ThemeData.appBarTheme] is used. If that is also null, then
/// [ThemeData.primaryTextTheme] is used. /// [ThemeData.primaryTextTheme] is used.
/// {@endtemplate} /// {@endtemplate}
@Deprecated(
'This property is no longer used, please use toolbarTextStyle and titleTextStyle instead. '
'This feature was deprecated after v2.4.0-0.0.pre.',
)
final TextTheme? textTheme; final TextTheme? textTheme;
/// {@template flutter.material.appbar.primary} /// {@template flutter.material.appbar.primary}
...@@ -674,21 +697,25 @@ class AppBar extends StatefulWidget implements PreferredSizeWidget { ...@@ -674,21 +697,25 @@ class AppBar extends StatefulWidget implements PreferredSizeWidget {
final double? leadingWidth; final double? leadingWidth;
/// {@template flutter.material.appbar.backwardsCompatibility} /// {@template flutter.material.appbar.backwardsCompatibility}
/// This property is deprecated and is false by default.
///
/// If true, preserves the original defaults for the [backgroundColor], /// If true, preserves the original defaults for the [backgroundColor],
/// [iconTheme], [actionsIconTheme] properties, and the original use of /// [iconTheme], [actionsIconTheme] properties, and the original use of
/// the [textTheme] and [brightness] properties. /// the [textTheme] and [brightness] properties.
/// ///
/// If this property is null, then [AppBarTheme.backwardsCompatibility] of /// If this property is null, then [AppBarTheme.backwardsCompatibility] of
/// [ThemeData.appBarTheme] is used. If that is also null, the default /// [ThemeData.appBarTheme] is used. If that is also null, the default
/// value is true. /// value is false.
/// ///
/// This is a temporary property. When setting it to false is no /// This is a temporary property and it has been deprecated. App
/// longer considered a breaking change, it will be deprecated and /// developers are encouraged to opt into the new features by
/// its default value will be changed to false. App developers are /// leaving it default (false) and using the [foregroundColor] and
/// encouraged to opt into the new features by setting it to false /// [systemOverlayStyle] properties as needed.
/// and using the [foregroundColor] and [systemOverlayStyle]
/// properties as needed.
/// {@endtemplate} /// {@endtemplate}
@Deprecated(
'This property is obsolete and is false by default. '
'This feature was deprecated after v2.4.0-0.0.pre.',
)
final bool? backwardsCompatibility; final bool? backwardsCompatibility;
/// {@template flutter.material.appbar.toolbarTextStyle} /// {@template flutter.material.appbar.toolbarTextStyle}
...@@ -729,7 +756,7 @@ class AppBar extends StatefulWidget implements PreferredSizeWidget { ...@@ -729,7 +756,7 @@ class AppBar extends StatefulWidget implements PreferredSizeWidget {
/// {@template flutter.material.appbar.systemOverlayStyle} /// {@template flutter.material.appbar.systemOverlayStyle}
/// Specifies the style to use for the system overlays that overlap the AppBar. /// Specifies the style to use for the system overlays that overlap the AppBar.
/// ///
/// This property is only used if [backwardsCompatibility] is set to false. /// This property is only used if [backwardsCompatibility] is false (the default).
/// ///
/// If this property is null, then [AppBarTheme.systemOverlayStyle] of /// If this property is null, then [AppBarTheme.systemOverlayStyle] of
/// [ThemeData.appBarTheme] is used. If that is also null, an appropriate /// [ThemeData.appBarTheme] is used. If that is also null, an appropriate
...@@ -848,7 +875,7 @@ class _AppBarState extends State<AppBar> { ...@@ -848,7 +875,7 @@ class _AppBarState extends State<AppBar> {
final bool useCloseButton = parentRoute is PageRoute<dynamic> && parentRoute.fullscreenDialog; final bool useCloseButton = parentRoute is PageRoute<dynamic> && parentRoute.fullscreenDialog;
final double toolbarHeight = widget.toolbarHeight ?? appBarTheme.toolbarHeight ?? kToolbarHeight; final double toolbarHeight = widget.toolbarHeight ?? appBarTheme.toolbarHeight ?? kToolbarHeight;
final bool backwardsCompatibility = widget.backwardsCompatibility ?? appBarTheme.backwardsCompatibility ?? true; final bool backwardsCompatibility = widget.backwardsCompatibility ?? appBarTheme.backwardsCompatibility ?? false;
final Color backgroundColor = backwardsCompatibility final Color backgroundColor = backwardsCompatibility
? widget.backgroundColor ? widget.backgroundColor
...@@ -1513,9 +1540,17 @@ class SliverAppBar extends StatefulWidget { ...@@ -1513,9 +1540,17 @@ class SliverAppBar extends StatefulWidget {
this.forceElevated = false, this.forceElevated = false,
this.backgroundColor, this.backgroundColor,
this.foregroundColor, this.foregroundColor,
@Deprecated(
'This property is no longer used, please use systemOverlayStyle instead. '
'This feature was deprecated after v2.4.0-0.0.pre.',
)
this.brightness, this.brightness,
this.iconTheme, this.iconTheme,
this.actionsIconTheme, this.actionsIconTheme,
@Deprecated(
'This property is no longer used, please use toolbarTextStyle and titleTextStyle instead. '
'This feature was deprecated after v2.4.0-0.0.pre.',
)
this.textTheme, this.textTheme,
this.primary = true, this.primary = true,
this.centerTitle, this.centerTitle,
...@@ -1613,6 +1648,10 @@ class SliverAppBar extends StatefulWidget { ...@@ -1613,6 +1648,10 @@ class SliverAppBar extends StatefulWidget {
/// {@macro flutter.material.appbar.brightness} /// {@macro flutter.material.appbar.brightness}
/// ///
/// This property is used to configure an [AppBar]. /// This property is used to configure an [AppBar].
@Deprecated(
'This property is no longer used, please use systemOverlayStyle instead. '
'This feature was deprecated after v2.4.0-0.0.pre.',
)
final Brightness? brightness; final Brightness? brightness;
/// {@macro flutter.material.appbar.iconTheme} /// {@macro flutter.material.appbar.iconTheme}
...@@ -1628,6 +1667,10 @@ class SliverAppBar extends StatefulWidget { ...@@ -1628,6 +1667,10 @@ class SliverAppBar extends StatefulWidget {
/// {@macro flutter.material.appbar.textTheme} /// {@macro flutter.material.appbar.textTheme}
/// ///
/// This property is used to configure an [AppBar]. /// This property is used to configure an [AppBar].
@Deprecated(
'This property is no longer used, please use toolbarTextStyle and titleTextStyle instead. '
'This feature was deprecated after v2.4.0-0.0.pre.',
)
final TextTheme? textTheme; final TextTheme? textTheme;
/// {@macro flutter.material.appbar.primary} /// {@macro flutter.material.appbar.primary}
......
...@@ -28,6 +28,10 @@ import 'theme.dart'; ...@@ -28,6 +28,10 @@ import 'theme.dart';
class AppBarTheme with Diagnosticable { class AppBarTheme with Diagnosticable {
/// Creates a theme that can be used for [ThemeData.appBarTheme]. /// Creates a theme that can be used for [ThemeData.appBarTheme].
const AppBarTheme({ const AppBarTheme({
@Deprecated(
'This property is no longer used, please use systemOverlayStyle instead. '
'This feature was deprecated after v2.4.0-0.0.pre.',
)
this.brightness, this.brightness,
Color? color, Color? color,
Color? backgroundColor, Color? backgroundColor,
...@@ -36,6 +40,10 @@ class AppBarTheme with Diagnosticable { ...@@ -36,6 +40,10 @@ class AppBarTheme with Diagnosticable {
this.shadowColor, this.shadowColor,
this.iconTheme, this.iconTheme,
this.actionsIconTheme, this.actionsIconTheme,
@Deprecated(
'This property is no longer used, please use toolbarTextStyle and titleTextStyle instead. '
'This feature was deprecated after v2.4.0-0.0.pre.',
)
this.textTheme, this.textTheme,
this.centerTitle, this.centerTitle,
this.titleSpacing, this.titleSpacing,
...@@ -43,6 +51,10 @@ class AppBarTheme with Diagnosticable { ...@@ -43,6 +51,10 @@ class AppBarTheme with Diagnosticable {
this.toolbarTextStyle, this.toolbarTextStyle,
this.titleTextStyle, this.titleTextStyle,
this.systemOverlayStyle, this.systemOverlayStyle,
@Deprecated(
'This property is obsolete and is false by default. '
'This feature was deprecated after v2.4.0-0.0.pre.',
)
this.backwardsCompatibility, this.backwardsCompatibility,
}) : assert( }) : assert(
color == null || backgroundColor == null, color == null || backgroundColor == null,
...@@ -50,7 +62,7 @@ class AppBarTheme with Diagnosticable { ...@@ -50,7 +62,7 @@ class AppBarTheme with Diagnosticable {
), ),
backgroundColor = backgroundColor ?? color; backgroundColor = backgroundColor ?? color;
/// This property is obsolete, please use [systemOverlayStyle] instead. /// This property is deprecated, please use [systemOverlayStyle] instead.
/// ///
/// Overrides the default value of the obsolete [AppBar.brightness] /// Overrides the default value of the obsolete [AppBar.brightness]
/// property which implicitly defines [AppBar.systemOverlayStyle] in /// property which implicitly defines [AppBar.systemOverlayStyle] in
...@@ -62,8 +74,14 @@ class AppBarTheme with Diagnosticable { ...@@ -62,8 +74,14 @@ class AppBarTheme with Diagnosticable {
/// [AppBar.systemOverlayStyle] in all descendant [AppBar] widgets. /// [AppBar.systemOverlayStyle] in all descendant [AppBar] widgets.
/// * [AppBar.backwardsCompatibility], which forces [AppBar] to depend /// * [AppBar.backwardsCompatibility], which forces [AppBar] to depend
/// on this obsolete property. /// on this obsolete property.
@Deprecated(
'This property is no longer used, please use systemOverlayStyle instead. '
'This feature was deprecated after v2.4.0-0.0.pre.',
)
final Brightness? brightness; final Brightness? brightness;
/// This property is deprecated, please use [backgroundColor] instead.
///
/// Obsolete property that overrides the default value of /// Obsolete property that overrides the default value of
/// [AppBar.backgroundColor] in all descendant [AppBar] widgets. /// [AppBar.backgroundColor] in all descendant [AppBar] widgets.
/// ///
...@@ -74,6 +92,10 @@ class AppBarTheme with Diagnosticable { ...@@ -74,6 +92,10 @@ class AppBarTheme with Diagnosticable {
/// [AppBar.backgroundColor]. /// [AppBar.backgroundColor].
/// * [AppBar.backwardsCompatibility], which forces [AppBar] to depend /// * [AppBar.backwardsCompatibility], which forces [AppBar] to depend
/// on this obsolete property. /// on this obsolete property.
@Deprecated(
'This property is no longer used, please use backgroundColor instead. '
'This feature was deprecated after v2.4.0-0.0.pre.',
)
Color? get color => backgroundColor; Color? get color => backgroundColor;
/// Overrides the default value of [AppBar.backgroundColor] in all /// Overrides the default value of [AppBar.backgroundColor] in all
...@@ -124,6 +146,9 @@ class AppBarTheme with Diagnosticable { ...@@ -124,6 +146,9 @@ class AppBarTheme with Diagnosticable {
/// [AppBar.foregroundColor] in all descendant widgets. /// [AppBar.foregroundColor] in all descendant widgets.
final IconThemeData? actionsIconTheme; final IconThemeData? actionsIconTheme;
/// This property is deprecated, please use [toolbarTextStyle] and
/// [titleTextStyle] instead.
///
/// Overrides the default value of the obsolete [AppBar.textTheme] /// Overrides the default value of the obsolete [AppBar.textTheme]
/// property in all descendant [AppBar] widgets. /// property in all descendant [AppBar] widgets.
/// ///
...@@ -133,6 +158,10 @@ class AppBarTheme with Diagnosticable { ...@@ -133,6 +158,10 @@ class AppBarTheme with Diagnosticable {
/// [AppBar.toolbarTextStyle in all descendant [AppBar] widgets. /// [AppBar.toolbarTextStyle in all descendant [AppBar] widgets.
/// * [titleTextStyle], which overrides the default value for /// * [titleTextStyle], which overrides the default value for
/// [AppBar.titleTextStyle in all descendant [AppBar] widgets. /// [AppBar.titleTextStyle in all descendant [AppBar] widgets.
@Deprecated(
'This property is no longer used, please use toolbarTextStyle and titleTextStyle instead. '
'This feature was deprecated after v2.4.0-0.0.pre.',
)
final TextTheme? textTheme; final TextTheme? textTheme;
/// Overrides the default value for [AppBar.centerTitle]. /// Overrides the default value for [AppBar.centerTitle].
...@@ -157,7 +186,8 @@ class AppBarTheme with Diagnosticable { ...@@ -157,7 +186,8 @@ class AppBarTheme with Diagnosticable {
/// Overrides the default value for the obsolete [AppBar.toolbarTextStyle] /// Overrides the default value for the obsolete [AppBar.toolbarTextStyle]
/// property in all descendant [AppBar] widgets. /// property in all descendant [AppBar] widgets.
/// ///
/// If this property is specified, then [backwardsCompatibility] should be true. /// If this property is specified, then [backwardsCompatibility]
/// should be false (the default).
/// ///
/// See also: /// See also:
/// ///
...@@ -168,7 +198,8 @@ class AppBarTheme with Diagnosticable { ...@@ -168,7 +198,8 @@ class AppBarTheme with Diagnosticable {
/// Overrides the default value of [AppBar.titleTextStyle] /// Overrides the default value of [AppBar.titleTextStyle]
/// property in all descendant [AppBar] widgets. /// property in all descendant [AppBar] widgets.
/// ///
/// If this property is specified, then [backwardsCompatibility] should be true. /// If this property is specified, then [backwardsCompatibility]
/// should be false (the default).
/// ///
/// See also: /// See also:
/// ///
...@@ -182,6 +213,10 @@ class AppBarTheme with Diagnosticable { ...@@ -182,6 +213,10 @@ class AppBarTheme with Diagnosticable {
/// Overrides the default value of [AppBar.backwardsCompatibility] /// Overrides the default value of [AppBar.backwardsCompatibility]
/// property in all descendant [AppBar] widgets. /// property in all descendant [AppBar] widgets.
@Deprecated(
'This property is obsolete and is false by default. '
'This feature was deprecated after v2.4.0-0.0.pre.',
)
final bool? backwardsCompatibility; final bool? backwardsCompatibility;
/// Creates a copy of this object with the given fields replaced with the /// Creates a copy of this object with the given fields replaced with the
......
...@@ -19,7 +19,6 @@ void main() { ...@@ -19,7 +19,6 @@ void main() {
MaterialApp( MaterialApp(
home: Scaffold( home: Scaffold(
appBar: AppBar( appBar: AppBar(
backwardsCompatibility: false,
actions: <Widget>[ actions: <Widget>[
IconButton(icon: const Icon(Icons.share), onPressed: () { }), IconButton(icon: const Icon(Icons.share), onPressed: () { }),
], ],
...@@ -54,7 +53,6 @@ void main() { ...@@ -54,7 +53,6 @@ void main() {
theme: ThemeData(appBarTheme: appBarTheme), theme: ThemeData(appBarTheme: appBarTheme),
home: Scaffold( home: Scaffold(
appBar: AppBar( appBar: AppBar(
backwardsCompatibility: false,
title: const Text('App Bar Title'), title: const Text('App Bar Title'),
actions: <Widget>[ actions: <Widget>[
IconButton(icon: const Icon(Icons.share), onPressed: () { }), IconButton(icon: const Icon(Icons.share), onPressed: () { }),
...@@ -143,7 +141,6 @@ void main() { ...@@ -143,7 +141,6 @@ void main() {
theme: ThemeData.from(colorScheme: const ColorScheme.light()), theme: ThemeData.from(colorScheme: const ColorScheme.light()),
home: Scaffold( home: Scaffold(
appBar: AppBar( appBar: AppBar(
backwardsCompatibility: false,
backgroundColor: color, backgroundColor: color,
brightness: brightness, brightness: brightness,
systemOverlayStyle: systemOverlayStyle, systemOverlayStyle: systemOverlayStyle,
...@@ -185,7 +182,6 @@ void main() { ...@@ -185,7 +182,6 @@ void main() {
await tester.pumpWidget(MaterialApp( await tester.pumpWidget(MaterialApp(
theme: ThemeData.from(colorScheme: const ColorScheme.light()), theme: ThemeData.from(colorScheme: const ColorScheme.light()),
home: Scaffold(appBar: AppBar( home: Scaffold(appBar: AppBar(
backwardsCompatibility: false,
iconTheme: iconThemeData, iconTheme: iconThemeData,
actionsIconTheme: actionsIconThemeData, actionsIconTheme: actionsIconThemeData,
actions: <Widget>[ actions: <Widget>[
...@@ -207,7 +203,6 @@ void main() { ...@@ -207,7 +203,6 @@ void main() {
.copyWith(appBarTheme: _appBarTheme()), .copyWith(appBarTheme: _appBarTheme()),
home: Scaffold( home: Scaffold(
appBar: AppBar( appBar: AppBar(
backwardsCompatibility: false,
actions: <Widget>[ actions: <Widget>[
IconButton(icon: const Icon(Icons.share), onPressed: () { }), IconButton(icon: const Icon(Icons.share), onPressed: () { }),
], ],
...@@ -244,7 +239,6 @@ void main() { ...@@ -244,7 +239,6 @@ void main() {
theme = Theme.of(context); theme = Theme.of(context);
return Scaffold( return Scaffold(
appBar: AppBar( appBar: AppBar(
backwardsCompatibility: false,
actions: <Widget>[ actions: <Widget>[
IconButton(icon: const Icon(Icons.share), onPressed: () { }), IconButton(icon: const Icon(Icons.share), onPressed: () { }),
], ],
...@@ -321,7 +315,6 @@ void main() { ...@@ -321,7 +315,6 @@ void main() {
builder: (BuildContext context) { builder: (BuildContext context) {
return Scaffold( return Scaffold(
appBar: AppBar( appBar: AppBar(
backwardsCompatibility: false,
iconTheme: IconThemeData(color: appBarIconColor), iconTheme: IconThemeData(color: appBarIconColor),
actions: <Widget>[ actions: <Widget>[
IconButton(icon: const Icon(Icons.share), onPressed: () { }), IconButton(icon: const Icon(Icons.share), onPressed: () { }),
...@@ -355,7 +348,6 @@ void main() { ...@@ -355,7 +348,6 @@ void main() {
theme: ThemeData(appBarTheme: const AppBarTheme(centerTitle: true)), theme: ThemeData(appBarTheme: const AppBarTheme(centerTitle: true)),
home: Scaffold(appBar: AppBar( home: Scaffold(appBar: AppBar(
title: const Text('Title'), title: const Text('Title'),
backwardsCompatibility: false,
)), )),
)); ));
...@@ -368,7 +360,6 @@ void main() { ...@@ -368,7 +360,6 @@ void main() {
theme: ThemeData(appBarTheme: const AppBarTheme(centerTitle: true)), theme: ThemeData(appBarTheme: const AppBarTheme(centerTitle: true)),
home: Scaffold( home: Scaffold(
appBar: AppBar( appBar: AppBar(
backwardsCompatibility: false,
title: const Text('Title'), title: const Text('Title'),
centerTitle: false, centerTitle: false,
), ),
...@@ -384,7 +375,6 @@ void main() { ...@@ -384,7 +375,6 @@ void main() {
await tester.pumpWidget(MaterialApp( await tester.pumpWidget(MaterialApp(
theme: ThemeData(platform: TargetPlatform.iOS), theme: ThemeData(platform: TargetPlatform.iOS),
home: Scaffold(appBar: AppBar( home: Scaffold(appBar: AppBar(
backwardsCompatibility: false,
title: const Text('Title'), title: const Text('Title'),
)), )),
)); ));
...@@ -400,7 +390,6 @@ void main() { ...@@ -400,7 +390,6 @@ void main() {
theme: ThemeData(appBarTheme: const AppBarTheme(shadowColor: Colors.red)), theme: ThemeData(appBarTheme: const AppBarTheme(shadowColor: Colors.red)),
home: Scaffold( home: Scaffold(
appBar: AppBar( appBar: AppBar(
backwardsCompatibility: false,
title: const Text('Title'), title: const Text('Title'),
shadowColor: Colors.yellow, shadowColor: Colors.yellow,
), ),
...@@ -418,7 +407,6 @@ void main() { ...@@ -418,7 +407,6 @@ void main() {
theme: ThemeData(appBarTheme: const AppBarTheme(titleSpacing: kTitleSpacing)), theme: ThemeData(appBarTheme: const AppBarTheme(titleSpacing: kTitleSpacing)),
home: Scaffold( home: Scaffold(
appBar: AppBar( appBar: AppBar(
backwardsCompatibility: false,
title: const Text('Title'), title: const Text('Title'),
), ),
), ),
...@@ -434,7 +422,6 @@ void main() { ...@@ -434,7 +422,6 @@ void main() {
theme: ThemeData(appBarTheme: const AppBarTheme(titleSpacing: kTitleSpacing)), theme: ThemeData(appBarTheme: const AppBarTheme(titleSpacing: kTitleSpacing)),
home: Scaffold( home: Scaffold(
appBar: AppBar( appBar: AppBar(
backwardsCompatibility: false,
title: const Text('Title'), title: const Text('Title'),
titleSpacing: 40, titleSpacing: 40,
), ),
...@@ -452,7 +439,6 @@ void main() { ...@@ -452,7 +439,6 @@ void main() {
home: const CustomScrollView( home: const CustomScrollView(
slivers: <Widget>[ slivers: <Widget>[
SliverAppBar( SliverAppBar(
backwardsCompatibility: false,
title: Text('Title'), title: Text('Title'),
), ),
], ],
...@@ -470,7 +456,6 @@ void main() { ...@@ -470,7 +456,6 @@ void main() {
home: const CustomScrollView( home: const CustomScrollView(
slivers: <Widget>[ slivers: <Widget>[
SliverAppBar( SliverAppBar(
backwardsCompatibility: false,
title: Text('Title'), title: Text('Title'),
titleSpacing: 40, titleSpacing: 40,
), ),
...@@ -497,7 +482,6 @@ void main() { ...@@ -497,7 +482,6 @@ void main() {
testWidgets('AppBarTheme implements debugFillProperties', (WidgetTester tester) async { testWidgets('AppBarTheme implements debugFillProperties', (WidgetTester tester) async {
final DiagnosticPropertiesBuilder builder = DiagnosticPropertiesBuilder(); final DiagnosticPropertiesBuilder builder = DiagnosticPropertiesBuilder();
const AppBarTheme( const AppBarTheme(
backwardsCompatibility: false,
brightness: Brightness.dark, brightness: Brightness.dark,
backgroundColor: Color(0xff000001), backgroundColor: Color(0xff000001),
elevation: 8.0, elevation: 8.0,
...@@ -518,7 +502,6 @@ void main() { ...@@ -518,7 +502,6 @@ void main() {
'shadowColor: Color(0xff000002)', 'shadowColor: Color(0xff000002)',
'centerTitle: true', 'centerTitle: true',
'titleSpacing: 40.0', 'titleSpacing: 40.0',
'backwardsCompatibility: false',
]); ]);
// On the web, Dart doubles and ints are backed by the same kind of object because // On the web, Dart doubles and ints are backed by the same kind of object because
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment