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