[rename fixit] ToolBar -> AppBar * left -> leading (Removes an LTR bias) * center -> title (Widget was actually centered) * right -> actions (Removes an LTR bias, asymmetric with leading) Fixes #2348
diff --git a/examples/material_gallery/lib/demo/buttons_demo.dart b/examples/material_gallery/lib/demo/buttons_demo.dart index 4fb92b2..dd9c9f1 100644 --- a/examples/material_gallery/lib/demo/buttons_demo.dart +++ b/examples/material_gallery/lib/demo/buttons_demo.dart
@@ -196,8 +196,8 @@ return new TabBarSelection<_ButtonDemo>( values: demos, child: new Scaffold( - toolBar: new ToolBar( - center: new Text("Buttons"), + appBar: new AppBar( + title: new Text("Buttons"), tabBar: new TabBar<_ButtonDemo>( isScrollable: true, labels: new Map<_ButtonDemo, TabLabel>.fromIterable(demos, value: (_ButtonDemo demo) => demo.tabLabel)
diff --git a/examples/material_gallery/lib/demo/cards_demo.dart b/examples/material_gallery/lib/demo/cards_demo.dart index c8e8911..722dddd 100644 --- a/examples/material_gallery/lib/demo/cards_demo.dart +++ b/examples/material_gallery/lib/demo/cards_demo.dart
@@ -117,8 +117,8 @@ class CardsDemo extends StatelessWidget { Widget build(BuildContext context) { return new Scaffold( - toolBar: new ToolBar( - center: new Text("Travel Stream") + appBar: new AppBar( + title: new Text("Travel Stream") ), body: new Block( padding: const EdgeInsets.only(top: 8.0, left: 8.0, right: 8.0),
diff --git a/examples/material_gallery/lib/demo/chip_demo.dart b/examples/material_gallery/lib/demo/chip_demo.dart index e6cf5a4..2c1f331 100644 --- a/examples/material_gallery/lib/demo/chip_demo.dart +++ b/examples/material_gallery/lib/demo/chip_demo.dart
@@ -36,7 +36,7 @@ } return new Scaffold( - toolBar: new ToolBar(center: new Text("Chips")), + appBar: new AppBar(title: new Text("Chips")), body: new Block( children: chips.map((Widget widget) { return new Container(
diff --git a/examples/material_gallery/lib/demo/colors_demo.dart b/examples/material_gallery/lib/demo/colors_demo.dart index e34ce9d..342806e 100644 --- a/examples/material_gallery/lib/demo/colors_demo.dart +++ b/examples/material_gallery/lib/demo/colors_demo.dart
@@ -111,9 +111,9 @@ return new TabBarSelection<ColorSwatch>( values: colorSwatches, child: new Scaffold( - toolBar: new ToolBar( + appBar: new AppBar( elevation: 0, - center: new Text("Colors"), + title: new Text("Colors"), tabBar: new TabBar<ColorSwatch>( isScrollable: true, labels: new Map<ColorSwatch, TabLabel>.fromIterable(colorSwatches, value: (ColorSwatch swatch) {
diff --git a/examples/material_gallery/lib/demo/date_picker_demo.dart b/examples/material_gallery/lib/demo/date_picker_demo.dart index 794c833..6bab652 100644 --- a/examples/material_gallery/lib/demo/date_picker_demo.dart +++ b/examples/material_gallery/lib/demo/date_picker_demo.dart
@@ -31,7 +31,7 @@ Widget build(BuildContext context) { return new Scaffold( - toolBar: new ToolBar(center: new Text("Date Picker")), + appBar: new AppBar(title: new Text("Date Picker")), body: new Column( children: <Widget>[ new Text(new DateFormat.yMMMd().format(_selectedDate)),
diff --git a/examples/material_gallery/lib/demo/dialog_demo.dart b/examples/material_gallery/lib/demo/dialog_demo.dart index 9a2540a..e30aef1 100644 --- a/examples/material_gallery/lib/demo/dialog_demo.dart +++ b/examples/material_gallery/lib/demo/dialog_demo.dart
@@ -80,8 +80,8 @@ return new Scaffold( key: scaffoldKey, - toolBar: new ToolBar( - center: new Text('Dialogs') + appBar: new AppBar( + title: new Text('Dialogs') ), body: new Block( padding: const EdgeInsets.symmetric(vertical: 24.0, horizontal: 72.0),
diff --git a/examples/material_gallery/lib/demo/drop_down_demo.dart b/examples/material_gallery/lib/demo/drop_down_demo.dart index 55afe0d..91e0179 100644 --- a/examples/material_gallery/lib/demo/drop_down_demo.dart +++ b/examples/material_gallery/lib/demo/drop_down_demo.dart
@@ -20,7 +20,7 @@ Widget build(BuildContext context) { return new Scaffold( - toolBar: new ToolBar(center: new Text("Dropdown Button")), + appBar: new AppBar(title: new Text("Dropdown Button")), body: new Center( child: new DropDownButton<String>( items: buildItems(),
diff --git a/examples/material_gallery/lib/demo/fitness_demo.dart b/examples/material_gallery/lib/demo/fitness_demo.dart index 355e2a9..91df6b0 100644 --- a/examples/material_gallery/lib/demo/fitness_demo.dart +++ b/examples/material_gallery/lib/demo/fitness_demo.dart
@@ -18,8 +18,8 @@ Widget build(BuildContext context) { return new Scaffold( - toolBar: new ToolBar( - center: new Text("Fitness") + appBar: new AppBar( + title: new Text("Fitness") ), body: new _FitnessDemoContents() );
diff --git a/examples/material_gallery/lib/demo/flexible_space_demo.dart b/examples/material_gallery/lib/demo/flexible_space_demo.dart index e17502f..c0719f6 100644 --- a/examples/material_gallery/lib/demo/flexible_space_demo.dart +++ b/examples/material_gallery/lib/demo/flexible_space_demo.dart
@@ -85,8 +85,8 @@ appBarHeight: appBarHeight, scrollableKey: scrollableKey, appBarBehavior: AppBarBehavior.scroll, - toolBar: new ToolBar( - right: <Widget>[ + appBar: new AppBar( + actions: <Widget>[ new IconButton( icon: Icons.create, tooltip: 'Search'
diff --git a/examples/material_gallery/lib/demo/full_screen_dialog_demo.dart b/examples/material_gallery/lib/demo/full_screen_dialog_demo.dart index 3f7d3e6..f6cf882 100644 --- a/examples/material_gallery/lib/demo/full_screen_dialog_demo.dart +++ b/examples/material_gallery/lib/demo/full_screen_dialog_demo.dart
@@ -141,13 +141,13 @@ final ThemeData theme = Theme.of(context); return new Scaffold( - toolBar: new ToolBar( - left: new IconButton( + appBar: new AppBar( + leading: new IconButton( icon: Icons.clear, onPressed: () { handleDismissButton(context); } ), - center: new Text('New Event'), - right: <Widget> [ + title: new Text('New Event'), + actions: <Widget> [ new FlatButton( child: new Text('SAVE', style: theme.textTheme.body1.copyWith(color: Colors.white)), onPressed: () {
diff --git a/examples/material_gallery/lib/demo/grid_list_demo.dart b/examples/material_gallery/lib/demo/grid_list_demo.dart index 834735b..e36cf78 100644 --- a/examples/material_gallery/lib/demo/grid_list_demo.dart +++ b/examples/material_gallery/lib/demo/grid_list_demo.dart
@@ -41,8 +41,8 @@ Navigator.push(context, new MaterialPageRoute<Null>( builder: (BuildContext context) { return new Scaffold( - toolBar: new ToolBar( - center: new Text(photo.title) + appBar: new AppBar( + title: new Text(photo.title) ), body: new Material( child: new AssetImage( @@ -172,9 +172,9 @@ Widget build(BuildContext context) { final Orientation orientation = MediaQuery.of(context).orientation; return new Scaffold( - toolBar: new ToolBar( - center: new Text('Grid List'), - right: <Widget>[ + appBar: new AppBar( + title: new Text('Grid List'), + actions: <Widget>[ new IconButton( icon: Icons.more_vert, onPressed: () { showTileStyleMenu(context); },
diff --git a/examples/material_gallery/lib/demo/icons_demo.dart b/examples/material_gallery/lib/demo/icons_demo.dart index a46d671..f7b9086 100644 --- a/examples/material_gallery/lib/demo/icons_demo.dart +++ b/examples/material_gallery/lib/demo/icons_demo.dart
@@ -66,8 +66,8 @@ final TextStyle textStyle = theme.textTheme.subhead.copyWith(color: theme.textTheme.caption.color); return new Scaffold( - toolBar: new ToolBar( - center: new Text('Icons') + appBar: new AppBar( + title: new Text('Icons') ), body: new IconTheme( data: new IconThemeData(opacity: iconOpacity),
diff --git a/examples/material_gallery/lib/demo/leave_behind_demo.dart b/examples/material_gallery/lib/demo/leave_behind_demo.dart index 30e695a..cbc86aa 100644 --- a/examples/material_gallery/lib/demo/leave_behind_demo.dart +++ b/examples/material_gallery/lib/demo/leave_behind_demo.dart
@@ -125,9 +125,9 @@ Widget build(BuildContext context) { return new Scaffold( key: _scaffoldKey, - toolBar: new ToolBar( - center: new Text('Swipe Items to Dismiss'), - right: <Widget>[ + appBar: new AppBar( + title: new Text('Swipe Items to Dismiss'), + actions: <Widget>[ new PopupMenuButton<LeaveBehindDemoAction>( onSelected: handleDemoAction, items: <PopupMenuEntry<LeaveBehindDemoAction>>[
diff --git a/examples/material_gallery/lib/demo/list_demo.dart b/examples/material_gallery/lib/demo/list_demo.dart index 7139108..b073046 100644 --- a/examples/material_gallery/lib/demo/list_demo.dart +++ b/examples/material_gallery/lib/demo/list_demo.dart
@@ -174,9 +174,9 @@ return new Scaffold( key: scaffoldKey, - toolBar: new ToolBar( - center: new Text('Scrolling List\n$itemSizeText$layoutText'), - right: <Widget>[ + appBar: new AppBar( + title: new Text('Scrolling List\n$itemSizeText$layoutText'), + actions: <Widget>[ new IconButton( icon: Icons.sort_by_alpha, tooltip: 'Sort',
diff --git a/examples/material_gallery/lib/demo/menu_demo.dart b/examples/material_gallery/lib/demo/menu_demo.dart index c3eac68..24a4eb9 100644 --- a/examples/material_gallery/lib/demo/menu_demo.dart +++ b/examples/material_gallery/lib/demo/menu_demo.dart
@@ -56,15 +56,15 @@ Widget build(BuildContext context) { return new Scaffold( key: _scaffoldKey, - toolBar: new ToolBar( - center: new Text('Menus'), - right: <Widget>[ + appBar: new AppBar( + title: new Text('Menus'), + actions: <Widget>[ new PopupMenuButton<String>( onSelected: showMenuSelection, items: <PopupMenuItem<String>>[ new PopupMenuItem<String>( - value: 'ToolBar Menu', - child: new Text('ToolBar Menu') + value: 'AppBar Menu', + child: new Text('AppBar Menu') ), new PopupMenuItem<String>( value: 'Right Here',
diff --git a/examples/material_gallery/lib/demo/modal_bottom_sheet_demo.dart b/examples/material_gallery/lib/demo/modal_bottom_sheet_demo.dart index 6341377..295fe4b 100644 --- a/examples/material_gallery/lib/demo/modal_bottom_sheet_demo.dart +++ b/examples/material_gallery/lib/demo/modal_bottom_sheet_demo.dart
@@ -13,7 +13,7 @@ Widget build(BuildContext context) { return new Scaffold( - toolBar: new ToolBar(center: new Text("Modal Bottom Sheet")), + appBar: new AppBar(title: new Text("Modal Bottom Sheet")), body: new Center( child: new Container( width: 200.0,
diff --git a/examples/material_gallery/lib/demo/page_selector_demo.dart b/examples/material_gallery/lib/demo/page_selector_demo.dart index 4158e46..3412557 100644 --- a/examples/material_gallery/lib/demo/page_selector_demo.dart +++ b/examples/material_gallery/lib/demo/page_selector_demo.dart
@@ -23,7 +23,7 @@ ]; return new Scaffold( - toolBar: new ToolBar(center: new Text('Page Selector')), + appBar: new AppBar(title: new Text('Page Selector')), body: new TabBarSelection<IconData>( values: icons, child: new Builder(
diff --git a/examples/material_gallery/lib/demo/persistent_bottom_sheet_demo.dart b/examples/material_gallery/lib/demo/persistent_bottom_sheet_demo.dart index 6513863..b003d5f 100644 --- a/examples/material_gallery/lib/demo/persistent_bottom_sheet_demo.dart +++ b/examples/material_gallery/lib/demo/persistent_bottom_sheet_demo.dart
@@ -28,7 +28,7 @@ Widget build(BuildContext notUsed) { // Can't find the Scaffold from this context. return new Scaffold( - toolBar: new ToolBar(center: new Text("Persistent Bottom Sheet")), + appBar: new AppBar(title: new Text("Persistent Bottom Sheet")), floatingActionButton: new FloatingActionButton( child: new Icon(icon: Icons.add), backgroundColor: Colors.redAccent[200]
diff --git a/examples/material_gallery/lib/demo/progress_indicator_demo.dart b/examples/material_gallery/lib/demo/progress_indicator_demo.dart index b6245ad..f26f07d 100644 --- a/examples/material_gallery/lib/demo/progress_indicator_demo.dart +++ b/examples/material_gallery/lib/demo/progress_indicator_demo.dart
@@ -83,7 +83,7 @@ Widget build(BuildContext context) { return new Scaffold( - toolBar: new ToolBar(center: new Text('Progress Indicators')), + appBar: new AppBar(title: new Text('Progress Indicators')), body: new DefaultTextStyle( style: Theme.of(context).textTheme.title, child: new GestureDetector(
diff --git a/examples/material_gallery/lib/demo/scrolling_techniques_demo.dart b/examples/material_gallery/lib/demo/scrolling_techniques_demo.dart index d5ac4fe..35d4a12 100644 --- a/examples/material_gallery/lib/demo/scrolling_techniques_demo.dart +++ b/examples/material_gallery/lib/demo/scrolling_techniques_demo.dart
@@ -48,8 +48,8 @@ ); } -class _ToolBarGraphic extends _BarGraphic { - _ToolBarGraphic() : super( +class _AppBarGraphic extends _BarGraphic { + _AppBarGraphic() : super( height: 48.0, color: Colors.blue[400], leftText: 'Tool Bar', @@ -113,7 +113,7 @@ class ScrollingTechniquesDemo extends StatelessWidget { Widget build(BuildContext context) { return new Scaffold( - toolBar: new ToolBar(center: new Text('Scrolling Techniques')), + appBar: new AppBar(title: new Text('Scrolling Techniques')), body: new Padding( padding: const EdgeInsets.symmetric(horizontal: 16.0), child: new Block( @@ -127,7 +127,7 @@ titleText: 'Standard', barGraphics: <Widget>[ new _StatusBarGraphic(), - new _ToolBarGraphic() + new _AppBarGraphic() ] ), new _TechniqueItem( @@ -135,7 +135,7 @@ builder: (BuildContext context) => new FlexibleSpaceDemo(), barGraphics: <Widget>[ new _StatusBarGraphic(), - new _ToolBarGraphic(), + new _AppBarGraphic(), new _TabBarGraphic() ] ), @@ -144,7 +144,7 @@ builder: (BuildContext context) => new FlexibleSpaceDemo(), barGraphics: <Widget>[ new _StatusBarGraphic(), - new _ToolBarGraphic(), + new _AppBarGraphic(), new _FlexibleSpaceGraphic() ] )
diff --git a/examples/material_gallery/lib/demo/slider_demo.dart b/examples/material_gallery/lib/demo/slider_demo.dart index a86ed46..bf0f0c2 100644 --- a/examples/material_gallery/lib/demo/slider_demo.dart +++ b/examples/material_gallery/lib/demo/slider_demo.dart
@@ -13,7 +13,7 @@ Widget build(BuildContext context) { return new Scaffold( - toolBar: new ToolBar(center: new Text("Sliders")), + appBar: new AppBar(title: new Text("Sliders")), body: new Block(children: <Widget>[ new Container( height: 100.0,
diff --git a/examples/material_gallery/lib/demo/snack_bar_demo.dart b/examples/material_gallery/lib/demo/snack_bar_demo.dart index 0b1595e..d487c2a 100644 --- a/examples/material_gallery/lib/demo/snack_bar_demo.dart +++ b/examples/material_gallery/lib/demo/snack_bar_demo.dart
@@ -58,8 +58,8 @@ Widget build(BuildContext context) { return new Scaffold( - toolBar: new ToolBar( - center: new Text('SnackBar') + appBar: new AppBar( + title: new Text('SnackBar') ), body: new Builder( // Create an inner BuildContext so that the snackBar onPressed methods
diff --git a/examples/material_gallery/lib/demo/tabs_demo.dart b/examples/material_gallery/lib/demo/tabs_demo.dart index 48c9ba3..3764670 100644 --- a/examples/material_gallery/lib/demo/tabs_demo.dart +++ b/examples/material_gallery/lib/demo/tabs_demo.dart
@@ -28,8 +28,8 @@ return new TabBarSelection<IconData>( values: icons, child: new Scaffold( - toolBar: new ToolBar( - center: new Text("Scrollable Tabs"), + appBar: new AppBar( + title: new Text("Scrollable Tabs"), tabBar: new TabBar<IconData>( isScrollable: true, labels: new Map<IconData, TabLabel>.fromIterable(
diff --git a/examples/material_gallery/lib/demo/tabs_fab_demo.dart b/examples/material_gallery/lib/demo/tabs_fab_demo.dart index 9cbe49b..723c4e9 100644 --- a/examples/material_gallery/lib/demo/tabs_fab_demo.dart +++ b/examples/material_gallery/lib/demo/tabs_fab_demo.dart
@@ -94,8 +94,8 @@ onChanged: _handleTabSelection, child: new Scaffold( key: scaffoldKey, - toolBar: new ToolBar( - center: new Text("FAB per Tab"), + appBar: new AppBar( + title: new Text("FAB per Tab"), tabBar: new TabBar<_Page>( labels: new Map<_Page, TabLabel>.fromIterable(pages, value: (_Page page) => page.tabLabel) )
diff --git a/examples/material_gallery/lib/demo/text_field_demo.dart b/examples/material_gallery/lib/demo/text_field_demo.dart index dffdc30..daea2a4 100644 --- a/examples/material_gallery/lib/demo/text_field_demo.dart +++ b/examples/material_gallery/lib/demo/text_field_demo.dart
@@ -62,8 +62,8 @@ Widget build(BuildContext context) { return new Scaffold( key: _scaffoldKey, - toolBar: new ToolBar( - center: new Text('Text Fields') + appBar: new AppBar( + title: new Text('Text Fields') ), body: new Block( padding: const EdgeInsets.all(8.0),
diff --git a/examples/material_gallery/lib/demo/time_picker_demo.dart b/examples/material_gallery/lib/demo/time_picker_demo.dart index 56a26f0..7d346aa 100644 --- a/examples/material_gallery/lib/demo/time_picker_demo.dart +++ b/examples/material_gallery/lib/demo/time_picker_demo.dart
@@ -27,7 +27,7 @@ Widget build(BuildContext context) { return new Scaffold( - toolBar: new ToolBar(center: new Text("Time Picker")), + appBar: new AppBar(title: new Text("Time Picker")), body: new Column( children: <Widget>[ new Text('$_selectedTime'),
diff --git a/examples/material_gallery/lib/demo/toggle_controls_demo.dart b/examples/material_gallery/lib/demo/toggle_controls_demo.dart index eb92ee8..9a63647 100644 --- a/examples/material_gallery/lib/demo/toggle_controls_demo.dart +++ b/examples/material_gallery/lib/demo/toggle_controls_demo.dart
@@ -33,7 +33,7 @@ Widget build(BuildContext context) { return new Scaffold( - toolBar: new ToolBar(center: new Text("Selection Controls")), + appBar: new AppBar(title: new Text("Selection Controls")), body: new Column( children: <Widget>[ new Row(
diff --git a/examples/material_gallery/lib/demo/tooltip_demo.dart b/examples/material_gallery/lib/demo/tooltip_demo.dart index a4a5dca..ed78c22 100644 --- a/examples/material_gallery/lib/demo/tooltip_demo.dart +++ b/examples/material_gallery/lib/demo/tooltip_demo.dart
@@ -13,8 +13,8 @@ Widget build(BuildContext context) { final ThemeData theme = Theme.of(context); return new Scaffold( - toolBar: new ToolBar( - center: new Text('Tooltip') + appBar: new AppBar( + title: new Text('Tooltip') ), body: new Builder( builder: (BuildContext context) {
diff --git a/examples/material_gallery/lib/demo/two_level_list_demo.dart b/examples/material_gallery/lib/demo/two_level_list_demo.dart index a9105ff..f47738f 100644 --- a/examples/material_gallery/lib/demo/two_level_list_demo.dart +++ b/examples/material_gallery/lib/demo/two_level_list_demo.dart
@@ -7,7 +7,7 @@ class TwoLevelListDemo extends StatelessWidget { Widget build(BuildContext context) { return new Scaffold( - toolBar: new ToolBar(center: new Text('Expand/Collapse List Control')), + appBar: new AppBar(title: new Text('Expand/Collapse List Control')), body: new Padding( padding: const EdgeInsets.all(0.0), child: new TwoLevelList(
diff --git a/examples/material_gallery/lib/demo/typography_demo.dart b/examples/material_gallery/lib/demo/typography_demo.dart index 83c0f55..1311edb 100644 --- a/examples/material_gallery/lib/demo/typography_demo.dart +++ b/examples/material_gallery/lib/demo/typography_demo.dart
@@ -62,7 +62,7 @@ } return new Scaffold( - toolBar: new ToolBar(center: new Text('Typography')), + appBar: new AppBar(title: new Text('Typography')), body: new Block(children: styleItems) ); }
diff --git a/examples/material_gallery/lib/demo/weather_demo.dart b/examples/material_gallery/lib/demo/weather_demo.dart index 1cd56da..4919f5c 100644 --- a/examples/material_gallery/lib/demo/weather_demo.dart +++ b/examples/material_gallery/lib/demo/weather_demo.dart
@@ -61,8 +61,8 @@ Widget build(BuildContext context) { if (!assetsLoaded) { return new Scaffold( - toolBar: new ToolBar( - center: new Text("Weather") + appBar: new AppBar( + title: new Text("Weather") ), body: new Container( decoration: new BoxDecoration( @@ -73,8 +73,8 @@ } return new Scaffold( - toolBar: new ToolBar( - center: new Text("Weather") + appBar: new AppBar( + title: new Text("Weather") ), body: new Material( child: new Stack(