mirror of
https://github.com/encounter/engine.git
synced 2026-03-30 11:09:55 -07:00
Merge pull request #1503 from abarth/simplify_scaffold
Simplify Scaffold
This commit is contained in:
@@ -81,7 +81,7 @@ class AddressBookHome extends StatelessComponent {
|
||||
|
||||
Widget build(BuildContext context) {
|
||||
return new Scaffold(
|
||||
toolbar: buildToolBar(context),
|
||||
toolBar: buildToolBar(context),
|
||||
body: buildBody(context),
|
||||
floatingActionButton: buildFloatingActionButton(context)
|
||||
);
|
||||
|
||||
@@ -192,7 +192,7 @@ final ThemeData _theme = new ThemeData(
|
||||
class DemoHome extends StatelessComponent {
|
||||
Widget build(BuildContext context) {
|
||||
return new Scaffold(
|
||||
toolbar: new ToolBar(center: new Text('Sky Demos')),
|
||||
toolBar: new ToolBar(center: new Text('Sky Demos')),
|
||||
body: new Material(
|
||||
type: MaterialType.canvas,
|
||||
child: new DemoList()
|
||||
|
||||
@@ -219,7 +219,7 @@ class FeedFragmentState extends State<FeedFragment> {
|
||||
|
||||
Widget build(BuildContext context) {
|
||||
return new Scaffold(
|
||||
toolbar: buildToolBar(),
|
||||
toolBar: buildToolBar(),
|
||||
body: buildBody(),
|
||||
snackBar: new Placeholder(key: _snackBarPlaceholderKey),
|
||||
floatingActionButton: buildFloatingActionButton()
|
||||
|
||||
@@ -105,7 +105,7 @@ class MealFragmentState extends State<MealFragment> {
|
||||
|
||||
Widget build(BuildContext context) {
|
||||
return new Scaffold(
|
||||
toolbar: buildToolBar(),
|
||||
toolBar: buildToolBar(),
|
||||
body: buildBody()
|
||||
);
|
||||
}
|
||||
|
||||
@@ -200,7 +200,7 @@ class MeasurementFragmentState extends State<MeasurementFragment> {
|
||||
|
||||
Widget build(BuildContext context) {
|
||||
return new Scaffold(
|
||||
toolbar: buildToolBar(),
|
||||
toolBar: buildToolBar(),
|
||||
body: buildBody(context),
|
||||
snackBar: new Placeholder(key: _snackBarPlaceholderKey)
|
||||
);
|
||||
|
||||
@@ -122,7 +122,7 @@ class SettingsFragmentState extends State<SettingsFragment> {
|
||||
|
||||
Widget build(BuildContext context) {
|
||||
return new Scaffold(
|
||||
toolbar: buildToolBar(),
|
||||
toolBar: buildToolBar(),
|
||||
body: buildSettingsPane(context)
|
||||
);
|
||||
}
|
||||
|
||||
@@ -182,7 +182,7 @@ class MineDiggerState extends State<MineDigger> {
|
||||
return new Title(
|
||||
title: 'Mine Digger',
|
||||
child: new Scaffold(
|
||||
toolbar: buildToolBar(context),
|
||||
toolBar: buildToolBar(context),
|
||||
body: new Container(
|
||||
child: new Center(child: board),
|
||||
decoration: new BoxDecoration(backgroundColor: Colors.grey[50])
|
||||
|
||||
@@ -238,7 +238,7 @@ class StockHomeState extends State<StockHome> {
|
||||
|
||||
Widget build(BuildContext context) {
|
||||
return new Scaffold(
|
||||
toolbar: _isSearching ? buildSearchBar() : buildToolBar(),
|
||||
toolBar: _isSearching ? buildSearchBar() : buildToolBar(),
|
||||
body: buildTabNavigator(),
|
||||
snackBar: new Placeholder(key: _snackBarPlaceholderKey),
|
||||
floatingActionButton: buildFloatingActionButton()
|
||||
|
||||
@@ -119,7 +119,7 @@ class StockSettingsState extends State<StockSettings> {
|
||||
|
||||
Widget build(BuildContext context) {
|
||||
return new Scaffold(
|
||||
toolbar: buildToolBar(context),
|
||||
toolBar: buildToolBar(context),
|
||||
body: buildSettingsPane(context)
|
||||
);
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ class StockSymbolViewerState extends State<StockSymbolViewer> {
|
||||
TextStyle headings = Theme.of(context).text.body2;
|
||||
|
||||
return new Scaffold(
|
||||
toolbar: new ToolBar(
|
||||
toolBar: new ToolBar(
|
||||
left: new IconButton(
|
||||
icon: 'navigation/arrow_back',
|
||||
onPressed: config.navigator.pop
|
||||
|
||||
@@ -342,7 +342,7 @@ class CardCollectionState extends State<CardCollection> {
|
||||
}
|
||||
|
||||
return new Scaffold(
|
||||
toolbar: buildToolBar(),
|
||||
toolBar: buildToolBar(),
|
||||
body: body
|
||||
);
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ class DatePickerDemoState extends State<DatePickerDemo> {
|
||||
),
|
||||
child: new Stack([
|
||||
new Scaffold(
|
||||
toolbar: new ToolBar(center: new Text("Date Picker")),
|
||||
toolBar: new ToolBar(center: new Text("Date Picker")),
|
||||
body: new Material(
|
||||
child: new Row(
|
||||
[new Text(_dateTime.toString())],
|
||||
|
||||
@@ -101,7 +101,7 @@ class DragAndDropApp extends StatefulComponent {
|
||||
class DragAndDropAppState extends State<DragAndDropApp> {
|
||||
Widget build(BuildContext context) {
|
||||
return new Scaffold(
|
||||
toolbar: new ToolBar(
|
||||
toolBar: new ToolBar(
|
||||
center: new Text('Drag and Drop Flutter Demo')
|
||||
),
|
||||
body: new Material(
|
||||
|
||||
@@ -89,7 +89,7 @@ class EnsureVisibleApp extends App {
|
||||
child: new Title(
|
||||
title: 'Cards',
|
||||
child: new Scaffold(
|
||||
toolbar: new ToolBar(center: new Text('Tap a Card')),
|
||||
toolBar: new ToolBar(center: new Text('Tap a Card')),
|
||||
body: cardCollection
|
||||
)
|
||||
)
|
||||
|
||||
@@ -138,7 +138,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')),
|
||||
toolBar: new ToolBar(center: new Text('Tap a Card')),
|
||||
body: new Container(
|
||||
padding: const EdgeDims.symmetric(vertical: 12.0, horizontal: 8.0),
|
||||
decoration: new BoxDecoration(backgroundColor: Theme.of(context).primarySwatch[50]),
|
||||
|
||||
@@ -149,7 +149,7 @@ class PageableListAppState extends State<PageableListApp> {
|
||||
return new IconTheme(
|
||||
data: const IconThemeData(color: IconThemeColor.white),
|
||||
child: new Scaffold(
|
||||
toolbar: buildToolBar(),
|
||||
toolBar: buildToolBar(),
|
||||
body: buildBody(context)
|
||||
)
|
||||
);
|
||||
|
||||
@@ -103,7 +103,7 @@ class ProgressIndicatorAppState extends State<ProgressIndicatorApp> {
|
||||
child: new Title(
|
||||
title: 'Progress Indicators',
|
||||
child: new Scaffold(
|
||||
toolbar: new ToolBar(center: new Text('Progress Indicators')),
|
||||
toolBar: new ToolBar(center: new Text('Progress Indicators')),
|
||||
body: new DefaultTextStyle(
|
||||
style: Theme.of(context).text.title,
|
||||
child: body
|
||||
|
||||
@@ -59,7 +59,7 @@ class ScaleAppState extends State<ScaleApp> {
|
||||
return new Theme(
|
||||
data: new ThemeData.dark(),
|
||||
child: new Scaffold(
|
||||
toolbar: new ToolBar(
|
||||
toolBar: new ToolBar(
|
||||
center: new Text('Scale Demo')),
|
||||
body: new Material(
|
||||
type: MaterialType.canvas,
|
||||
|
||||
@@ -124,7 +124,7 @@ class SectorApp extends App {
|
||||
child: new Title(
|
||||
title: 'Sector Layout',
|
||||
child: new Scaffold(
|
||||
toolbar: new ToolBar(
|
||||
toolBar: new ToolBar(
|
||||
center: new Text('Sector Layout in a Widget Tree')
|
||||
),
|
||||
body: buildBody()
|
||||
|
||||
@@ -106,7 +106,7 @@ HAL: This mission is too important for me to allow you to jeopardize it.''';
|
||||
color: Colors.grey[50],
|
||||
child: interactiveBody
|
||||
),
|
||||
toolbar: new ToolBar(
|
||||
toolBar: new ToolBar(
|
||||
center: new Text('Hal and Dave')
|
||||
)
|
||||
)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user