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 0369af62db0..ecb7889814e 100644 --- a/examples/material_gallery/lib/demo/full_screen_dialog_demo.dart +++ b/examples/material_gallery/lib/demo/full_screen_dialog_demo.dart @@ -159,95 +159,87 @@ class FullScreenDialogDemoState extends State { ) ] ), - body: new Padding( + body: new Block( padding: const EdgeInsets.all(16.0), - child: new ScrollableViewport( - child: new Column( - crossAxisAlignment: CrossAxisAlignment.stretch, - mainAxisAlignment: MainAxisAlignment.collapse, + children: [ + new Container( + padding: const EdgeInsets.symmetric(vertical: 8.0), + decoration: new BoxDecoration( + border: new Border(bottom: new BorderSide(color: theme.dividerColor)) + ), + child: new Align( + alignment: FractionalOffset.bottomLeft, + child: new Text('Event name', style: theme.textTheme.display2) + ) + ), + new Container( + padding: const EdgeInsets.symmetric(vertical: 8.0), + decoration: new BoxDecoration( + border: new Border(bottom: new BorderSide(color: theme.dividerColor)) + ), + child: new Align( + alignment: FractionalOffset.bottomLeft, + child: new Text('Location', style: theme.textTheme.title.copyWith(color: Colors.black54)) + ) + ), + new Column( + crossAxisAlignment: CrossAxisAlignment.start, children: [ - new Container( - padding: const EdgeInsets.symmetric(vertical: 8.0), - decoration: new BoxDecoration( - border: new Border(bottom: new BorderSide(color: theme.dividerColor)) - ), - child: new Align( - alignment: FractionalOffset.bottomLeft, - child: new Text('Event name', style: theme.textTheme.display2) - ) - ), - new Container( - padding: const EdgeInsets.symmetric(vertical: 8.0), - decoration: new BoxDecoration( - border: new Border(bottom: new BorderSide(color: theme.dividerColor)) - ), - child: new Align( - alignment: FractionalOffset.bottomLeft, - child: new Text('Location', style: theme.textTheme.title.copyWith(color: Colors.black54)) - ) - ), - new Column( - crossAxisAlignment: CrossAxisAlignment.stretch, - mainAxisAlignment: MainAxisAlignment.end, - children: [ - new Text('From', style: theme.textTheme.caption), - new DateTimeItem( - dateTime: _fromDateTime, - onChanged: (DateTime value) { - setState(() { - _fromDateTime = value; - _saveNeeded = true; - }); - } - ) - ] - ), - new Column( - crossAxisAlignment: CrossAxisAlignment.stretch, - mainAxisAlignment: MainAxisAlignment.end, - children: [ - new Text('To', style: theme.textTheme.caption), - new DateTimeItem( - dateTime: _toDateTime, - onChanged: (DateTime value) { - setState(() { - _toDateTime = value; - _saveNeeded = true; - }); - } - ) - ] - ), - new Container( - decoration: new BoxDecoration( - border: new Border(bottom: new BorderSide(color: theme.dividerColor)) - ), - child: new Row( - children: [ - new Checkbox( - value: _allDayValue, - onChanged: (bool value) { - setState(() { - _allDayValue = value; - _saveNeeded = true; - }); - } - ), - new Text('All-day') - ] - ) + new Text('From', style: theme.textTheme.caption), + new DateTimeItem( + dateTime: _fromDateTime, + onChanged: (DateTime value) { + setState(() { + _fromDateTime = value; + _saveNeeded = true; + }); + } ) ] - .map((Widget child) { - return new Container( - padding: const EdgeInsets.symmetric(vertical: 8.0), - height: 96.0, - child: child - ); - }) - .toList() + ), + new Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + new Text('To', style: theme.textTheme.caption), + new DateTimeItem( + dateTime: _toDateTime, + onChanged: (DateTime value) { + setState(() { + _toDateTime = value; + _saveNeeded = true; + }); + } + ) + ] + ), + new Container( + decoration: new BoxDecoration( + border: new Border(bottom: new BorderSide(color: theme.dividerColor)) + ), + child: new Row( + children: [ + new Checkbox( + value: _allDayValue, + onChanged: (bool value) { + setState(() { + _allDayValue = value; + _saveNeeded = true; + }); + } + ), + new Text('All-day') + ] + ) ) - ) + ] + .map((Widget child) { + return new Container( + padding: const EdgeInsets.symmetric(vertical: 8.0), + height: 96.0, + child: child + ); + }) + .toList() ) ); } diff --git a/examples/material_gallery/lib/demo/list_demo.dart b/examples/material_gallery/lib/demo/list_demo.dart index fdf0c0edbcb..08237b56b33 100644 --- a/examples/material_gallery/lib/demo/list_demo.dart +++ b/examples/material_gallery/lib/demo/list_demo.dart @@ -38,9 +38,7 @@ class ListDemoState extends State { decoration: new BoxDecoration( border: new Border(top: new BorderSide(color: Colors.black26)) ), - child: new Column( - mainAxisAlignment: MainAxisAlignment.collapse, - crossAxisAlignment: CrossAxisAlignment.stretch, + child: new Block( children: [ new ListItem( dense: true, diff --git a/examples/material_gallery/lib/demo/tooltip_demo.dart b/examples/material_gallery/lib/demo/tooltip_demo.dart index 4d481341aee..2028209a309 100644 --- a/examples/material_gallery/lib/demo/tooltip_demo.dart +++ b/examples/material_gallery/lib/demo/tooltip_demo.dart @@ -19,8 +19,7 @@ class TooltipDemo extends StatelessWidget { ), body: new Builder( builder: (BuildContext context) { - return new Column( - crossAxisAlignment: CrossAxisAlignment.stretch, + return new Block( children: [ new Text(_introText, style: theme.textTheme.subhead), new Row(