Change Block children to be a named parameter
This commit is contained in:
@@ -56,7 +56,7 @@ class AddressBookHome extends StatelessComponent {
|
||||
static final GlobalKey noteKey = new GlobalKey(debugLabel: 'note field');
|
||||
|
||||
Widget buildBody(BuildContext context) {
|
||||
return new Block(<Widget>[
|
||||
return new Block(children: <Widget>[
|
||||
new AspectRatio(
|
||||
aspectRatio: 16.0 / 9.0,
|
||||
child: new Container(
|
||||
|
||||
@@ -64,7 +64,7 @@ class FeedFragmentState extends State<FeedFragment> {
|
||||
|
||||
Widget _buildDrawer() {
|
||||
return new Drawer(
|
||||
child: new Block(<Widget>[
|
||||
child: new Block(children: <Widget>[
|
||||
new DrawerHeader(child: new Text('Fitness')),
|
||||
new DrawerItem(
|
||||
icon: 'action/view_list',
|
||||
@@ -239,7 +239,7 @@ class AddItemDialogState extends State<AddItemDialog> {
|
||||
}
|
||||
return new Dialog(
|
||||
title: new Text("What are you doing?"),
|
||||
content: new Block(menuItems),
|
||||
content: new Block(children: menuItems),
|
||||
actions: <Widget>[
|
||||
new FlatButton(
|
||||
child: new Text('CANCEL'),
|
||||
|
||||
@@ -85,7 +85,7 @@ class MealFragmentState extends State<MealFragment> {
|
||||
|
||||
Widget buildBody() {
|
||||
Meal meal = new Meal(when: new DateTime.now());
|
||||
return new Block(<Widget>[
|
||||
return new Block(children: <Widget>[
|
||||
new Text(meal.displayDate),
|
||||
new Input(
|
||||
key: descriptionKey,
|
||||
|
||||
@@ -87,7 +87,7 @@ class SettingsFragmentState extends State<SettingsFragment> {
|
||||
}
|
||||
|
||||
Widget buildSettingsPane(BuildContext context) {
|
||||
return new Block(<Widget>[
|
||||
return new Block(children: <Widget>[
|
||||
new DrawerItem(
|
||||
onPressed: () { _handleBackupChanged(!(config.userData.backupMode == BackupMode.enabled)); },
|
||||
child: new Row(
|
||||
|
||||
@@ -37,12 +37,14 @@ class _ChipDemoState extends State<ChipDemo> {
|
||||
|
||||
return new Scaffold(
|
||||
toolBar: new ToolBar(center: new Text("Chips")),
|
||||
body: new Block(chips.map((Widget widget) {
|
||||
return new Container(
|
||||
height: 100.0,
|
||||
child: new Center(child: widget)
|
||||
);
|
||||
}).toList())
|
||||
body: new Block(
|
||||
children: chips.map((Widget widget) {
|
||||
return new Container(
|
||||
height: 100.0,
|
||||
child: new Center(child: widget)
|
||||
);
|
||||
}).toList()
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ class _SliderDemoState extends State<SliderDemo> {
|
||||
Widget build(BuildContext context) {
|
||||
return new Scaffold(
|
||||
toolBar: new ToolBar(center: new Text("Sliders")),
|
||||
body: new Block(<Widget>[
|
||||
body: new Block(children: <Widget>[
|
||||
new Container(
|
||||
height: 100.0,
|
||||
child: new Center(
|
||||
|
||||
@@ -128,7 +128,7 @@ class GalleryHome extends StatelessComponent {
|
||||
body: new Padding(
|
||||
padding: const EdgeDims.all(4.0),
|
||||
child: new Block(
|
||||
<Widget>[
|
||||
children: <Widget>[
|
||||
new Row(
|
||||
children: <Widget>[
|
||||
new GallerySection(
|
||||
|
||||
@@ -71,7 +71,7 @@ class StockHomeState extends State<StockHome> {
|
||||
|
||||
Widget _buildDrawer(BuildContext context) {
|
||||
return new Drawer(
|
||||
child: new Block(<Widget>[
|
||||
child: new Block(children: <Widget>[
|
||||
new DrawerHeader(child: new Text('Stocks')),
|
||||
new DrawerItem(
|
||||
icon: 'action/assessment',
|
||||
|
||||
@@ -152,7 +152,7 @@ class StockSettingsState extends State<StockSettings> {
|
||||
return true;
|
||||
});
|
||||
return new Block(
|
||||
rows,
|
||||
children: rows,
|
||||
padding: const EdgeDims.symmetric(vertical: 20.0)
|
||||
);
|
||||
}
|
||||
|
||||
@@ -59,12 +59,14 @@ class StockSymbolPage extends StatelessComponent {
|
||||
toolBar: new ToolBar(
|
||||
center: new Text(stock.name)
|
||||
),
|
||||
body: new Block(<Widget>[
|
||||
new Container(
|
||||
margin: new EdgeDims.all(20.0),
|
||||
child: new Card(child: new StockSymbolView(stock: stock))
|
||||
)
|
||||
])
|
||||
body: new Block(
|
||||
children: <Widget>[
|
||||
new Container(
|
||||
margin: new EdgeDims.all(20.0),
|
||||
child: new Card(child: new StockSymbolView(stock: stock))
|
||||
)
|
||||
]
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -121,7 +121,7 @@ class CardCollectionState extends State<CardCollection> {
|
||||
return new Drawer(
|
||||
child: new IconTheme(
|
||||
data: const IconThemeData(color: IconThemeColor.black),
|
||||
child: new Block(<Widget>[
|
||||
child: new Block(children: <Widget>[
|
||||
new DrawerHeader(child: new Text('Options')),
|
||||
buildDrawerCheckbox("Make card labels editable", _editable, _toggleEditable),
|
||||
buildDrawerCheckbox("Snap fling scrolls to center", _snapToCenter, _toggleSnapToCenter),
|
||||
|
||||
@@ -95,7 +95,7 @@ class CrabPage extends StatelessComponent {
|
||||
return new Material(
|
||||
color: const Color(0x00000000),
|
||||
child: new Block(
|
||||
<Widget>[
|
||||
children: <Widget>[
|
||||
new Stack(
|
||||
children: <Widget>[
|
||||
new HeroImage(
|
||||
|
||||
@@ -41,7 +41,7 @@ class HorizontalScrollingApp extends StatelessComponent {
|
||||
return new Center(
|
||||
child: new Container(
|
||||
height: 50.0,
|
||||
child: new Block(circles, scrollDirection: Axis.horizontal)
|
||||
child: new Block(children: circles, scrollDirection: Axis.horizontal)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
@@ -53,10 +53,12 @@ class PostDemoState extends State<PostDemo> {
|
||||
),
|
||||
body: new Material(
|
||||
child: new Block(
|
||||
[new Text(
|
||||
"${_response ?? 'Loading...'}",
|
||||
style: Typography.black.body1
|
||||
)]
|
||||
children: <Widget>[
|
||||
new Text(
|
||||
"${_response ?? 'Loading...'}",
|
||||
style: Typography.black.body1
|
||||
)
|
||||
]
|
||||
)
|
||||
),
|
||||
floatingActionButton: new FloatingActionButton(
|
||||
|
||||
@@ -88,7 +88,7 @@ class _MimicDemoState extends State<MimicDemo> {
|
||||
return new GestureDetector(
|
||||
onTap: _handleTap,
|
||||
onLongPress: _reset,
|
||||
child: new Block(children)
|
||||
child: new Block(children: children)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,7 +8,8 @@ class Home extends StatelessComponent {
|
||||
Widget build(BuildContext context) {
|
||||
return new Material(
|
||||
child: new Center(
|
||||
child: new Block(<Widget>[
|
||||
child: new Block(
|
||||
children: <Widget>[
|
||||
new Text(
|
||||
'You are at home.',
|
||||
style: Theme.of(context).text.display2.copyWith(textAlign: TextAlign.center)
|
||||
@@ -34,7 +35,8 @@ class Shopping extends StatelessComponent {
|
||||
return new Material(
|
||||
color: Colors.deepPurple[300],
|
||||
child: new Center(
|
||||
child: new Block(<Widget>[
|
||||
child: new Block(
|
||||
children: <Widget>[
|
||||
new Text(
|
||||
'Village Shop',
|
||||
style: Theme.of(context).text.display2.copyWith(textAlign: TextAlign.center)
|
||||
@@ -60,7 +62,8 @@ class Adventure extends StatelessComponent {
|
||||
return new Material(
|
||||
color: Colors.red[300],
|
||||
child: new Center(
|
||||
child: new Block(<Widget>[
|
||||
child: new Block(
|
||||
children: <Widget>[
|
||||
new Text(
|
||||
'Monster\'s Lair',
|
||||
style: Theme.of(context).text.display2.copyWith(textAlign: TextAlign.center)
|
||||
|
||||
@@ -79,7 +79,7 @@ class PageableListAppState extends State<PageableListApp> {
|
||||
|
||||
Widget _buildDrawer() {
|
||||
return new Drawer(
|
||||
child: new Block(<Widget>[
|
||||
child: new Block(children: <Widget>[
|
||||
new DrawerHeader(child: new Text('Options')),
|
||||
new DrawerItem(
|
||||
icon: 'navigation/more_horiz',
|
||||
|
||||
@@ -106,7 +106,7 @@ class SmoothBlockState extends State<SmoothBlock> {
|
||||
|
||||
class SmoothResizeDemo extends StatelessComponent {
|
||||
Widget build(BuildContext context) {
|
||||
return new Block(_kColors.map((Map<int, Color> color) => new SmoothBlock(color: color)).toList());
|
||||
return new Block(children: _kColors.map((Map<int, Color> color) => new SmoothBlock(color: color)).toList());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user