Change Block children to be a named parameter
This commit is contained in:
@@ -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