Commit a9b7a41b authored by Hans Muller's avatar Hans Muller

Merge pull request #2690 from HansMuller/copy_with_rename

Updated AppBar.copyWith parameter names
parents 5ca03073 c111daf6
...@@ -42,9 +42,9 @@ class AppBar extends StatelessWidget { ...@@ -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 { ...@@ -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> { ...@@ -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> { ...@@ -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> { ...@@ -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
); );
} }
......
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