[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
This commit is contained in:
Adam Barth
2016-03-12 17:22:40 -08:00
parent e48c822ce3
commit ede5dfce30
52 changed files with 170 additions and 170 deletions

View File

@@ -272,9 +272,9 @@ class CardCollectionState extends State<CardCollection> {
);
}
Widget _buildToolBar(BuildContext context) {
return new ToolBar(
right: <Widget>[
Widget _buildAppBar(BuildContext context) {
return new AppBar(
actions: <Widget>[
new Text(_dismissDirectionText(_dismissDirection))
],
flexibleSpace: (_) {
@@ -451,7 +451,7 @@ class CardCollectionState extends State<CardCollection> {
primarySwatch: _primaryColor
),
child: new Scaffold(
toolBar: _buildToolBar(context),
appBar: _buildAppBar(context),
drawer: _buildDrawer(),
body: body
)

View File

@@ -223,8 +223,8 @@ class DragAndDropAppState extends State<DragAndDropApp> {
}
Widget build(BuildContext context) {
return new Scaffold(
toolBar: new ToolBar(
center: new Text('Drag and Drop Flutter Demo')
appBar: new AppBar(
title: new Text('Drag and Drop Flutter Demo')
),
body: new Column(
children: <Widget>[

View File

@@ -154,7 +154,7 @@ class OverlayGeometryAppState extends State<OverlayGeometryApp> {
Widget build(BuildContext context) {
List<Widget> layers = <Widget>[
new Scaffold(
toolBar: new ToolBar(center: new Text('Tap a Card')),
appBar: new AppBar(title: new Text('Tap a Card')),
body: new Container(
padding: const EdgeInsets.symmetric(vertical: 12.0, horizontal: 8.0),
child: new ScrollableMixedWidgetList(

View File

@@ -105,10 +105,10 @@ class PageableListAppState extends State<PageableListApp> {
);
}
Widget _buildToolBar() {
return new ToolBar(
center: new Text('PageableList'),
right: <Widget>[
Widget _buildAppBar() {
return new AppBar(
title: new Text('PageableList'),
actions: <Widget>[
new Text(scrollDirection == Axis.horizontal ? "horizontal" : "vertical")
]
);
@@ -126,7 +126,7 @@ class PageableListAppState extends State<PageableListApp> {
return new IconTheme(
data: const IconThemeData(color: Colors.white),
child: new Scaffold(
toolBar: _buildToolBar(),
appBar: _buildAppBar(),
drawer: _buildDrawer(),
body: _buildBody(context)
)

View File

@@ -15,8 +15,8 @@ void main() {
routes: <String, WidgetBuilder>{
'/': (BuildContext context) {
return new Scaffold(
toolBar: new ToolBar(
center: new Text("Hardware Key Demo")
appBar: new AppBar(
title: new Text("Hardware Key Demo")
),
body: new Material(
child: new RawKeyboardDemo(