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
......
...@@ -27,7 +27,6 @@ Widget buildSliverAppBarApp({ ...@@ -27,7 +27,6 @@ Widget buildSliverAppBarApp({
primary: true, primary: true,
slivers: <Widget>[ slivers: <Widget>[
SliverAppBar( SliverAppBar(
backwardsCompatibility: false,
title: const Text('AppBar Title'), title: const Text('AppBar Title'),
floating: floating, floating: floating,
pinned: pinned, pinned: pinned,
...@@ -73,7 +72,6 @@ void main() { ...@@ -73,7 +72,6 @@ void main() {
theme: ThemeData(platform: TargetPlatform.android), theme: ThemeData(platform: TargetPlatform.android),
home: Scaffold( home: Scaffold(
appBar: AppBar( appBar: AppBar(
backwardsCompatibility: false,
title: const Text('X'), title: const Text('X'),
), ),
), ),
...@@ -94,7 +92,6 @@ void main() { ...@@ -94,7 +92,6 @@ void main() {
theme: ThemeData(platform: platform), theme: ThemeData(platform: platform),
home: Scaffold( home: Scaffold(
appBar: AppBar( appBar: AppBar(
backwardsCompatibility: false,
title: const Text('X'), title: const Text('X'),
), ),
), ),
...@@ -113,7 +110,6 @@ void main() { ...@@ -113,7 +110,6 @@ void main() {
theme: ThemeData(platform: platform), theme: ThemeData(platform: platform),
home: Scaffold( home: Scaffold(
appBar: AppBar( appBar: AppBar(
backwardsCompatibility: false,
title: const Text('X'), title: const Text('X'),
actions: const <Widget>[ actions: const <Widget>[
Icon(Icons.thumb_up), Icon(Icons.thumb_up),
...@@ -135,7 +131,6 @@ void main() { ...@@ -135,7 +131,6 @@ void main() {
theme: ThemeData(platform: platform), theme: ThemeData(platform: platform),
home: Scaffold( home: Scaffold(
appBar: AppBar( appBar: AppBar(
backwardsCompatibility: false,
title: const Text('X'), title: const Text('X'),
actions: const <Widget>[ actions: const <Widget>[
Icon(Icons.thumb_up), Icon(Icons.thumb_up),
...@@ -158,7 +153,6 @@ void main() { ...@@ -158,7 +153,6 @@ void main() {
theme: ThemeData(platform: TargetPlatform.android), theme: ThemeData(platform: TargetPlatform.android),
home: Scaffold( home: Scaffold(
appBar: AppBar( appBar: AppBar(
backwardsCompatibility: false,
centerTitle: true, centerTitle: true,
title: const Text('X'), title: const Text('X'),
), ),
...@@ -178,7 +172,6 @@ void main() { ...@@ -178,7 +172,6 @@ void main() {
MaterialApp( MaterialApp(
home: Scaffold( home: Scaffold(
appBar: AppBar( appBar: AppBar(
backwardsCompatibility: false,
centerTitle: false, centerTitle: false,
title: const Placeholder(key: Key('X')), title: const Placeholder(key: Key('X')),
), ),
...@@ -198,7 +191,6 @@ void main() { ...@@ -198,7 +191,6 @@ void main() {
textDirection: TextDirection.rtl, textDirection: TextDirection.rtl,
child: Scaffold( child: Scaffold(
appBar: AppBar( appBar: AppBar(
backwardsCompatibility: false,
centerTitle: false, centerTitle: false,
title: const Placeholder(key: Key('X')), title: const Placeholder(key: Key('X')),
), ),
...@@ -217,7 +209,6 @@ void main() { ...@@ -217,7 +209,6 @@ void main() {
MaterialApp( MaterialApp(
home: Scaffold( home: Scaffold(
appBar: AppBar( appBar: AppBar(
backwardsCompatibility: false,
centerTitle: false, centerTitle: false,
titleSpacing: 32.0, titleSpacing: 32.0,
title: const Placeholder(key: Key('X')), title: const Placeholder(key: Key('X')),
...@@ -238,7 +229,6 @@ void main() { ...@@ -238,7 +229,6 @@ void main() {
textDirection: TextDirection.rtl, textDirection: TextDirection.rtl,
child: Scaffold( child: Scaffold(
appBar: AppBar( appBar: AppBar(
backwardsCompatibility: false,
centerTitle: false, centerTitle: false,
titleSpacing: 32.0, titleSpacing: 32.0,
title: const Placeholder(key: Key('X')), title: const Placeholder(key: Key('X')),
...@@ -260,7 +250,6 @@ void main() { ...@@ -260,7 +250,6 @@ void main() {
MaterialApp( MaterialApp(
home: Scaffold( home: Scaffold(
appBar: AppBar( appBar: AppBar(
backwardsCompatibility: false,
centerTitle: false, centerTitle: false,
title: const Text('X'), title: const Text('X'),
), ),
...@@ -283,7 +272,6 @@ void main() { ...@@ -283,7 +272,6 @@ void main() {
textDirection: TextDirection.rtl, textDirection: TextDirection.rtl,
child: Scaffold( child: Scaffold(
appBar: AppBar( appBar: AppBar(
backwardsCompatibility: false,
centerTitle: false, centerTitle: false,
title: const Text('X'), title: const Text('X'),
), ),
...@@ -310,7 +298,6 @@ void main() { ...@@ -310,7 +298,6 @@ void main() {
return MaterialApp( return MaterialApp(
home: Scaffold( home: Scaffold(
appBar: AppBar( appBar: AppBar(
backwardsCompatibility: false,
leading: leading, leading: leading,
centerTitle: false, centerTitle: false,
title: Container( title: Container(
...@@ -374,7 +361,6 @@ void main() { ...@@ -374,7 +361,6 @@ void main() {
return MaterialApp( return MaterialApp(
home: Scaffold( home: Scaffold(
appBar: AppBar( appBar: AppBar(
backwardsCompatibility: false,
leading: leading, leading: leading,
centerTitle: true, centerTitle: true,
title: Container( title: Container(
...@@ -429,7 +415,6 @@ void main() { ...@@ -429,7 +415,6 @@ void main() {
textDirection: TextDirection.rtl, textDirection: TextDirection.rtl,
child: Scaffold( child: Scaffold(
appBar: AppBar( appBar: AppBar(
backwardsCompatibility: false,
leading: leading, leading: leading,
centerTitle: true, centerTitle: true,
title: Container( title: Container(
...@@ -475,7 +460,6 @@ void main() { ...@@ -475,7 +460,6 @@ void main() {
home: SizedBox( home: SizedBox(
height: kToolbarHeight, height: kToolbarHeight,
child: AppBar( child: AppBar(
backwardsCompatibility: false,
leading: const Text('L'), leading: const Text('L'),
title: const Text('No Scaffold'), title: const Text('No Scaffold'),
actions: const <Widget>[Text('A1'), Text('A2')], actions: const <Widget>[Text('A1'), Text('A2')],
...@@ -499,7 +483,6 @@ void main() { ...@@ -499,7 +483,6 @@ void main() {
width: 0.0, width: 0.0,
child: Scaffold( child: Scaffold(
appBar: AppBar( appBar: AppBar(
backwardsCompatibility: false,
title: const Text('X'), title: const Text('X'),
), ),
), ),
...@@ -523,7 +506,6 @@ void main() { ...@@ -523,7 +506,6 @@ void main() {
MaterialApp( MaterialApp(
home: Scaffold( home: Scaffold(
appBar: AppBar( appBar: AppBar(
backwardsCompatibility: false,
key: appBarKey, key: appBarKey,
leading: SizedBox(key: leadingKey, height: 50.0), leading: SizedBox(key: leadingKey, height: 50.0),
title: SizedBox(key: titleKey, height: 40.0), title: SizedBox(key: titleKey, height: 40.0),
...@@ -623,7 +605,6 @@ void main() { ...@@ -623,7 +605,6 @@ void main() {
theme: ThemeData(platform: TargetPlatform.android), theme: ThemeData(platform: TargetPlatform.android),
home: Scaffold( home: Scaffold(
appBar: AppBar( appBar: AppBar(
backwardsCompatibility: false,
title: const Text('X'), title: const Text('X'),
), ),
drawer: Column(), // Doesn't really matter. Triggers a hamburger regardless. drawer: Column(), // Doesn't really matter. Triggers a hamburger regardless.
...@@ -642,7 +623,6 @@ void main() { ...@@ -642,7 +623,6 @@ void main() {
theme: ThemeData(platform: TargetPlatform.android), theme: ThemeData(platform: TargetPlatform.android),
home: Scaffold( home: Scaffold(
appBar: AppBar( appBar: AppBar(
backwardsCompatibility: false,
title: const Text('X'), title: const Text('X'),
actions: const <Widget> [ actions: const <Widget> [
IconButton( IconButton(
...@@ -1012,7 +992,6 @@ void main() { ...@@ -1012,7 +992,6 @@ void main() {
home: CustomScrollView( home: CustomScrollView(
slivers: <Widget>[ slivers: <Widget>[
SliverAppBar( SliverAppBar(
backwardsCompatibility: false,
title: const Text('Title'), title: const Text('Title'),
forceElevated: forceElevated, forceElevated: forceElevated,
elevation: elevation, elevation: elevation,
...@@ -1096,7 +1075,6 @@ void main() { ...@@ -1096,7 +1075,6 @@ void main() {
child: Scaffold( child: Scaffold(
primary: true, primary: true,
appBar: AppBar( appBar: AppBar(
backwardsCompatibility: false,
title: const Text('title'), title: const Text('title'),
), ),
), ),
...@@ -1122,7 +1100,6 @@ void main() { ...@@ -1122,7 +1100,6 @@ void main() {
child: Scaffold( child: Scaffold(
primary: false, primary: false,
appBar: AppBar( appBar: AppBar(
backwardsCompatibility: false,
bottom: PreferredSize( bottom: PreferredSize(
preferredSize: const Size.fromHeight(200.0), preferredSize: const Size.fromHeight(200.0),
child: Container(), child: Container(),
...@@ -1150,7 +1127,6 @@ void main() { ...@@ -1150,7 +1127,6 @@ void main() {
child: Scaffold( child: Scaffold(
primary: true, primary: true,
appBar: AppBar( appBar: AppBar(
backwardsCompatibility: false,
bottom: PreferredSize( bottom: PreferredSize(
preferredSize: const Size.fromHeight(200.0), preferredSize: const Size.fromHeight(200.0),
child: Container(), child: Container(),
...@@ -1176,7 +1152,6 @@ void main() { ...@@ -1176,7 +1152,6 @@ void main() {
child: MediaQuery( child: MediaQuery(
data: topPadding100, data: topPadding100,
child: AppBar( child: AppBar(
backwardsCompatibility: false,
primary: false, primary: false,
title: const Text('title'), title: const Text('title'),
), ),
...@@ -1206,7 +1181,6 @@ void main() { ...@@ -1206,7 +1181,6 @@ void main() {
body: Column( body: Column(
children: <Widget>[ children: <Widget>[
AppBar( AppBar(
backwardsCompatibility: false,
title: const Text('title'), title: const Text('title'),
), ),
], ],
...@@ -1246,7 +1220,6 @@ void main() { ...@@ -1246,7 +1220,6 @@ void main() {
home: Scaffold( home: Scaffold(
drawer: const Drawer(), drawer: const Drawer(),
appBar: AppBar( appBar: AppBar(
backwardsCompatibility: false,
automaticallyImplyLeading: false, automaticallyImplyLeading: false,
), ),
), ),
...@@ -1353,7 +1326,6 @@ void main() { ...@@ -1353,7 +1326,6 @@ void main() {
MaterialApp( MaterialApp(
home: Center( home: Center(
child: AppBar( child: AppBar(
backwardsCompatibility: false,
title: const Text('Abc'), title: const Text('Abc'),
actions: <Widget>[ actions: <Widget>[
IconButton( IconButton(
...@@ -1395,7 +1367,6 @@ void main() { ...@@ -1395,7 +1367,6 @@ void main() {
MaterialApp( MaterialApp(
home: Center( home: Center(
child: AppBar( child: AppBar(
backwardsCompatibility: false,
leading: Placeholder(key: key), leading: Placeholder(key: key),
title: const Text('Abc'), title: const Text('Abc'),
actions: const <Widget>[ actions: const <Widget>[
...@@ -1417,7 +1388,6 @@ void main() { ...@@ -1417,7 +1388,6 @@ void main() {
MaterialApp( MaterialApp(
home: Center( home: Center(
child: AppBar( child: AppBar(
backwardsCompatibility: false,
leading: Placeholder(key: key), leading: Placeholder(key: key),
title: const Text('Abc'), title: const Text('Abc'),
actions: const <Widget>[ actions: const <Widget>[
...@@ -1448,7 +1418,6 @@ void main() { ...@@ -1448,7 +1418,6 @@ void main() {
MaterialApp( MaterialApp(
home: Center( home: Center(
child: AppBar( child: AppBar(
backwardsCompatibility: false,
leading: Placeholder(key: key), leading: Placeholder(key: key),
title: const Text('Abc'), title: const Text('Abc'),
actions: const <Widget>[ actions: const <Widget>[
...@@ -1490,7 +1459,6 @@ void main() { ...@@ -1490,7 +1459,6 @@ void main() {
MaterialApp( MaterialApp(
home: Center( home: Center(
child: AppBar( child: AppBar(
backwardsCompatibility: false,
leading: Placeholder(key: key), leading: Placeholder(key: key),
title: const Text('Abc'), title: const Text('Abc'),
actions: const <Widget>[ actions: const <Widget>[
...@@ -1538,7 +1506,6 @@ void main() { ...@@ -1538,7 +1506,6 @@ void main() {
child: Scaffold( child: Scaffold(
primary: false, primary: false,
appBar: AppBar( appBar: AppBar(
backwardsCompatibility: false,
leading: Placeholder(key: leadingKey), // Forced to 56x56, see _kLeadingWidth in app_bar.dart. leading: Placeholder(key: leadingKey), // Forced to 56x56, see _kLeadingWidth in app_bar.dart.
title: Placeholder(key: titleKey, fallbackHeight: kToolbarHeight), title: Placeholder(key: titleKey, fallbackHeight: kToolbarHeight),
actions: <Widget>[ Placeholder(key: trailingKey, fallbackWidth: 10) ], actions: <Widget>[ Placeholder(key: trailingKey, fallbackWidth: 10) ],
...@@ -1584,7 +1551,6 @@ void main() { ...@@ -1584,7 +1551,6 @@ void main() {
primary: true, primary: true,
slivers: <Widget>[ slivers: <Widget>[
SliverAppBar( SliverAppBar(
backwardsCompatibility: false,
leading: Placeholder(key: leadingKey), leading: Placeholder(key: leadingKey),
title: Placeholder(key: titleKey, fallbackHeight: kToolbarHeight), title: Placeholder(key: titleKey, fallbackHeight: kToolbarHeight),
actions: <Widget>[ Placeholder(key: trailingKey) ], actions: <Widget>[ Placeholder(key: trailingKey) ],
...@@ -1623,7 +1589,6 @@ void main() { ...@@ -1623,7 +1589,6 @@ void main() {
primary: true, primary: true,
slivers: <Widget>[ slivers: <Widget>[
SliverAppBar( SliverAppBar(
backwardsCompatibility: false,
leading: Placeholder(key: leadingKey), leading: Placeholder(key: leadingKey),
title: Placeholder(key: titleKey), title: Placeholder(key: titleKey),
actions: <Widget>[ Placeholder(key: trailingKey) ], actions: <Widget>[ Placeholder(key: trailingKey) ],
...@@ -1646,7 +1611,6 @@ void main() { ...@@ -1646,7 +1611,6 @@ void main() {
MaterialApp( MaterialApp(
home: Center( home: Center(
child: AppBar( child: AppBar(
backwardsCompatibility: false,
leading: const Text('Leading'), leading: const Text('Leading'),
title: const Text('Title'), title: const Text('Title'),
actions: const <Widget>[ actions: const <Widget>[
...@@ -1732,7 +1696,6 @@ void main() { ...@@ -1732,7 +1696,6 @@ void main() {
textDirection: TextDirection.rtl, textDirection: TextDirection.rtl,
child: Center( child: Center(
child: AppBar( child: AppBar(
backwardsCompatibility: false,
leading: const Text('Leading'), leading: const Text('Leading'),
title: const Text('Title'), title: const Text('Title'),
actions: const <Widget>[ actions: const <Widget>[
...@@ -1821,7 +1784,6 @@ void main() { ...@@ -1821,7 +1784,6 @@ void main() {
MaterialApp( MaterialApp(
home: Center( home: Center(
child: AppBar( child: AppBar(
backwardsCompatibility: false,
leading: const Text('Leading'), leading: const Text('Leading'),
title: const ExcludeSemantics(child: Text('Title')), title: const ExcludeSemantics(child: Text('Title')),
excludeHeaderSemantics: true, excludeHeaderSemantics: true,
...@@ -1879,7 +1841,6 @@ void main() { ...@@ -1879,7 +1841,6 @@ void main() {
home: CustomScrollView( home: CustomScrollView(
slivers: <Widget>[ slivers: <Widget>[
SliverAppBar( SliverAppBar(
backwardsCompatibility: false,
leading: Text('Leading'), leading: Text('Leading'),
flexibleSpace: ExcludeSemantics(child: Text('Title')), flexibleSpace: ExcludeSemantics(child: Text('Title')),
actions: <Widget>[Text('Action 1')], actions: <Widget>[Text('Action 1')],
...@@ -1950,7 +1911,6 @@ void main() { ...@@ -1950,7 +1911,6 @@ void main() {
home: CustomScrollView( home: CustomScrollView(
slivers: <Widget>[ slivers: <Widget>[
SliverAppBar( SliverAppBar(
backwardsCompatibility: false,
leading: Text('Leading'), leading: Text('Leading'),
flexibleSpace: Text('Flexible space'), flexibleSpace: Text('Flexible space'),
actions: <Widget>[Text('Action 1')], actions: <Widget>[Text('Action 1')],
...@@ -2025,7 +1985,6 @@ void main() { ...@@ -2025,7 +1985,6 @@ void main() {
theme: darkTheme, theme: darkTheme,
home: Scaffold( home: Scaffold(
appBar: AppBar( appBar: AppBar(
backwardsCompatibility: false,
title: const Text('test'), title: const Text('test'),
), ),
), ),
...@@ -2046,7 +2005,6 @@ void main() { ...@@ -2046,7 +2005,6 @@ void main() {
theme: lightTheme, theme: lightTheme,
home: Scaffold( home: Scaffold(
appBar: AppBar( appBar: AppBar(
backwardsCompatibility: false,
title: const Text('test'), title: const Text('test'),
), ),
), ),
...@@ -2067,7 +2025,6 @@ void main() { ...@@ -2067,7 +2025,6 @@ void main() {
theme: lightTheme, theme: lightTheme,
home: Scaffold( home: Scaffold(
appBar: AppBar( appBar: AppBar(
backwardsCompatibility: false,
title: const Text('test'), title: const Text('test'),
), ),
), ),
...@@ -2088,7 +2045,6 @@ void main() { ...@@ -2088,7 +2045,6 @@ void main() {
theme: darkTheme, theme: darkTheme,
home: Scaffold( home: Scaffold(
appBar: AppBar( appBar: AppBar(
backwardsCompatibility: false,
title: const Text('test'), title: const Text('test'),
), ),
), ),
...@@ -2116,7 +2072,6 @@ void main() { ...@@ -2116,7 +2072,6 @@ void main() {
body: CustomScrollView( body: CustomScrollView(
slivers: <Widget>[ slivers: <Widget>[
SliverAppBar( SliverAppBar(
backwardsCompatibility: false,
expandedHeight: appBarHeight, expandedHeight: appBarHeight,
pinned: false, pinned: false,
floating: true, floating: true,
...@@ -2170,7 +2125,6 @@ void main() { ...@@ -2170,7 +2125,6 @@ void main() {
await tester.pumpWidget( await tester.pumpWidget(
MaterialApp( MaterialApp(
home: AppBar( home: AppBar(
backwardsCompatibility: false,
leading: const Text('L'), leading: const Text('L'),
title: const Text('No Scaffold'), title: const Text('No Scaffold'),
actions: const <Widget>[Text('A1'), Text('A2')], actions: const <Widget>[Text('A1'), Text('A2')],
...@@ -2194,7 +2148,6 @@ void main() { ...@@ -2194,7 +2148,6 @@ void main() {
await tester.pumpWidget( await tester.pumpWidget(
MaterialApp( MaterialApp(
home: AppBar( home: AppBar(
backwardsCompatibility: false,
leading: const Text('L'), leading: const Text('L'),
title: const Text('No Scaffold'), title: const Text('No Scaffold'),
actions: const <Widget>[Text('A1'), Text('A2')], actions: const <Widget>[Text('A1'), Text('A2')],
...@@ -2218,7 +2171,6 @@ void main() { ...@@ -2218,7 +2171,6 @@ void main() {
home: CustomScrollView( home: CustomScrollView(
slivers: <Widget>[ slivers: <Widget>[
SliverAppBar( SliverAppBar(
backwardsCompatibility: false,
leading: Text('L'), leading: Text('L'),
title: Text('No Scaffold'), title: Text('No Scaffold'),
actions: <Widget>[Text('A1'), Text('A2')], actions: <Widget>[Text('A1'), Text('A2')],
...@@ -2246,7 +2198,6 @@ void main() { ...@@ -2246,7 +2198,6 @@ void main() {
home: CustomScrollView( home: CustomScrollView(
slivers: <Widget>[ slivers: <Widget>[
SliverAppBar( SliverAppBar(
backwardsCompatibility: false,
leading: Text('L'), leading: Text('L'),
title: Text('No Scaffold'), title: Text('No Scaffold'),
actions: <Widget>[Text('A1'), Text('A2')], actions: <Widget>[Text('A1'), Text('A2')],
...@@ -2277,7 +2228,6 @@ void main() { ...@@ -2277,7 +2228,6 @@ void main() {
data: MediaQuery.of(context).copyWith(textScaleFactor: textScaleFactor), data: MediaQuery.of(context).copyWith(textScaleFactor: textScaleFactor),
child: Scaffold( child: Scaffold(
appBar: AppBar( appBar: AppBar(
backwardsCompatibility: false,
centerTitle: false, centerTitle: false,
title: const Text('Jumbo', style: TextStyle(fontSize: 18)), title: const Text('Jumbo', style: TextStyle(fontSize: 18)),
), ),
...@@ -2318,7 +2268,6 @@ void main() { ...@@ -2318,7 +2268,6 @@ void main() {
builder: (BuildContext context) { builder: (BuildContext context) {
return Scaffold( return Scaffold(
appBar: AppBar( appBar: AppBar(
backwardsCompatibility: false,
centerTitle: centerTitle, centerTitle: centerTitle,
title: MediaQuery( title: MediaQuery(
data: MediaQuery.of(context).copyWith(textScaleFactor: textScaleFactor), data: MediaQuery.of(context).copyWith(textScaleFactor: textScaleFactor),
...@@ -2379,7 +2328,6 @@ void main() { ...@@ -2379,7 +2328,6 @@ void main() {
home: CustomScrollView( home: CustomScrollView(
slivers: <Widget>[ slivers: <Widget>[
SliverAppBar( SliverAppBar(
backwardsCompatibility: false,
title: const Text('Jumbo'), title: const Text('Jumbo'),
pinned: pinned, pinned: pinned,
floating: floating, floating: floating,
...@@ -2413,7 +2361,6 @@ void main() { ...@@ -2413,7 +2361,6 @@ void main() {
MaterialApp( MaterialApp(
home: Scaffold( home: Scaffold(
appBar: AppBar( appBar: AppBar(
backwardsCompatibility: false,
title: const Text('Title'), title: const Text('Title'),
toolbarHeight: 48, toolbarHeight: 48,
), ),
...@@ -2491,7 +2438,6 @@ void main() { ...@@ -2491,7 +2438,6 @@ void main() {
await tester.pumpWidget(MaterialApp( await tester.pumpWidget(MaterialApp(
home: Scaffold( home: Scaffold(
appBar: AppBar( appBar: AppBar(
backwardsCompatibility: false,
leading: const Placeholder(key: key), leading: const Placeholder(key: key),
leadingWidth: 100, leadingWidth: 100,
title: const Text('Title'), title: const Text('Title'),
...@@ -2509,7 +2455,6 @@ void main() { ...@@ -2509,7 +2455,6 @@ void main() {
home: CustomScrollView( home: CustomScrollView(
slivers: <Widget>[ slivers: <Widget>[
SliverAppBar( SliverAppBar(
backwardsCompatibility: false,
leading: Placeholder(key: key), leading: Placeholder(key: key),
leadingWidth: 100, leadingWidth: 100,
title: Text('Title'), title: Text('Title'),
...@@ -2572,7 +2517,6 @@ void main() { ...@@ -2572,7 +2517,6 @@ void main() {
MaterialApp( MaterialApp(
home: Scaffold( home: Scaffold(
appBar: AppBar( appBar: AppBar(
backwardsCompatibility: false,
foregroundColor: foregroundColor, foregroundColor: foregroundColor,
backgroundColor: backgroundColor, backgroundColor: backgroundColor,
leading: Icon(Icons.add_circle, key: leadingIconKey), leading: Icon(Icons.add_circle, key: leadingIconKey),
...@@ -2659,7 +2603,6 @@ void main() { ...@@ -2659,7 +2603,6 @@ void main() {
body: CustomScrollView( body: CustomScrollView(
slivers: <Widget>[ slivers: <Widget>[
SliverAppBar( SliverAppBar(
backwardsCompatibility: false,
elevation: 0, elevation: 0,
backgroundColor: MaterialStateColor.resolveWith((Set<MaterialState> states) { backgroundColor: MaterialStateColor.resolveWith((Set<MaterialState> states) {
return states.contains(MaterialState.scrolledUnder) ? scrolledColor : defaultColor; return states.contains(MaterialState.scrolledUnder) ? scrolledColor : defaultColor;
...@@ -2720,7 +2663,6 @@ void main() { ...@@ -2720,7 +2663,6 @@ void main() {
body: CustomScrollView( body: CustomScrollView(
slivers: <Widget>[ slivers: <Widget>[
SliverAppBar( SliverAppBar(
backwardsCompatibility: false,
elevation: 0, elevation: 0,
backgroundColor: MaterialStateColor.resolveWith((Set<MaterialState> states) { backgroundColor: MaterialStateColor.resolveWith((Set<MaterialState> states) {
return states.contains(MaterialState.scrolledUnder) ? scrolledColor : defaultColor; return states.contains(MaterialState.scrolledUnder) ? scrolledColor : defaultColor;
...@@ -2782,7 +2724,6 @@ void main() { ...@@ -2782,7 +2724,6 @@ void main() {
MaterialApp( MaterialApp(
home: Scaffold( home: Scaffold(
appBar: AppBar( appBar: AppBar(
backwardsCompatibility: false,
elevation: 0, elevation: 0,
backgroundColor: MaterialStateColor.resolveWith((Set<MaterialState> states) { backgroundColor: MaterialStateColor.resolveWith((Set<MaterialState> states) {
return states.contains(MaterialState.scrolledUnder) ? scrolledColor : defaultColor; return states.contains(MaterialState.scrolledUnder) ? scrolledColor : defaultColor;
...@@ -2834,7 +2775,6 @@ void main() { ...@@ -2834,7 +2775,6 @@ void main() {
MaterialApp( MaterialApp(
home: Scaffold( home: Scaffold(
appBar: AppBar( appBar: AppBar(
backwardsCompatibility: false,
elevation: 0, elevation: 0,
backgroundColor: MaterialStateColor.resolveWith((Set<MaterialState> states) { backgroundColor: MaterialStateColor.resolveWith((Set<MaterialState> states) {
return states.contains(MaterialState.scrolledUnder) ? scrolledColor : defaultColor; return states.contains(MaterialState.scrolledUnder) ? scrolledColor : defaultColor;
...@@ -2890,7 +2830,6 @@ void main() { ...@@ -2890,7 +2830,6 @@ void main() {
MaterialApp( MaterialApp(
home: Scaffold( home: Scaffold(
appBar: AppBar( appBar: AppBar(
backwardsCompatibility: false,
title: const Text('AppBar'), title: const Text('AppBar'),
), ),
body: Scrollbar( body: Scrollbar(
...@@ -2918,7 +2857,6 @@ void main() { ...@@ -2918,7 +2857,6 @@ void main() {
MaterialApp( MaterialApp(
home: Scaffold( home: Scaffold(
appBar: AppBar( appBar: AppBar(
backwardsCompatibility: false,
elevation: 0, elevation: 0,
backgroundColor: MaterialStateColor.resolveWith((Set<MaterialState> states) { backgroundColor: MaterialStateColor.resolveWith((Set<MaterialState> states) {
return states.contains(MaterialState.scrolledUnder) ? scrolledColor : defaultColor; return states.contains(MaterialState.scrolledUnder) ? scrolledColor : defaultColor;
......
...@@ -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