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 {
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
);
}
......
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