Updated AppBar.copyWith parameter names
This commit is contained in:
parent
7012d5223b
commit
c111daf6f0
@ -42,9 +42,9 @@ class AppBar extends StatelessWidget {
|
|||||||
|
|
||||||
AppBar copyWith({
|
AppBar copyWith({
|
||||||
Key key,
|
Key key,
|
||||||
Widget left,
|
Widget leading,
|
||||||
Widget center,
|
Widget title,
|
||||||
List<Widget> right,
|
List<Widget> actions,
|
||||||
WidgetBuilder flexibleSpace,
|
WidgetBuilder flexibleSpace,
|
||||||
double foregroundOpacity,
|
double foregroundOpacity,
|
||||||
int elevation,
|
int elevation,
|
||||||
@ -54,9 +54,9 @@ class AppBar extends StatelessWidget {
|
|||||||
}) {
|
}) {
|
||||||
return new AppBar(
|
return new AppBar(
|
||||||
key: key ?? this.key,
|
key: key ?? this.key,
|
||||||
leading: left ?? this.leading,
|
leading: leading ?? this.leading,
|
||||||
title: center ?? this.title,
|
title: title ?? this.title,
|
||||||
actions: right ?? this.actions,
|
actions: actions ?? this.actions,
|
||||||
flexibleSpace: flexibleSpace ?? this.flexibleSpace,
|
flexibleSpace: flexibleSpace ?? this.flexibleSpace,
|
||||||
foregroundOpacity: foregroundOpacity ?? this.foregroundOpacity,
|
foregroundOpacity: foregroundOpacity ?? this.foregroundOpacity,
|
||||||
tabBar: tabBar ?? this.tabBar,
|
tabBar: tabBar ?? this.tabBar,
|
||||||
|
@ -406,10 +406,10 @@ class ScaffoldState extends State<Scaffold> {
|
|||||||
if (appBar == null)
|
if (appBar == null)
|
||||||
return null;
|
return null;
|
||||||
EdgeInsets appBarPadding = new EdgeInsets.only(top: padding.top);
|
EdgeInsets appBarPadding = new EdgeInsets.only(top: padding.top);
|
||||||
Widget left = appBar.leading;
|
Widget leading = appBar.leading;
|
||||||
if (left == null) {
|
if (leading == null) {
|
||||||
if (config.drawer != null) {
|
if (config.drawer != null) {
|
||||||
left = new IconButton(
|
leading = new IconButton(
|
||||||
icon: Icons.menu,
|
icon: Icons.menu,
|
||||||
onPressed: openDrawer,
|
onPressed: openDrawer,
|
||||||
tooltip: 'Open navigation menu' // TODO(ianh): Figure out how to localize this string
|
tooltip: 'Open navigation menu' // TODO(ianh): Figure out how to localize this string
|
||||||
@ -417,7 +417,7 @@ class ScaffoldState extends State<Scaffold> {
|
|||||||
} else {
|
} else {
|
||||||
_shouldShowBackArrow ??= Navigator.canPop(context);
|
_shouldShowBackArrow ??= Navigator.canPop(context);
|
||||||
if (_shouldShowBackArrow) {
|
if (_shouldShowBackArrow) {
|
||||||
left = new IconButton(
|
leading = new IconButton(
|
||||||
icon: Icons.arrow_back,
|
icon: Icons.arrow_back,
|
||||||
onPressed: () => Navigator.pop(context),
|
onPressed: () => Navigator.pop(context),
|
||||||
tooltip: 'Back' // TODO(ianh): Figure out how to localize this string
|
tooltip: 'Back' // TODO(ianh): Figure out how to localize this string
|
||||||
@ -429,7 +429,7 @@ class ScaffoldState extends State<Scaffold> {
|
|||||||
elevation: elevation ?? appBar.elevation ?? 4,
|
elevation: elevation ?? appBar.elevation ?? 4,
|
||||||
padding: appBarPadding,
|
padding: appBarPadding,
|
||||||
foregroundOpacity: foregroundOpacity,
|
foregroundOpacity: foregroundOpacity,
|
||||||
left: left
|
leading: leading
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user