Commit 41338c35 authored by Ian Hickson's avatar Ian Hickson

Use Material design rules for capitalisation

See https://www.google.com/design/spec/style/writing.html#
parent 2d49e807
...@@ -201,7 +201,7 @@ class _ButtonsDemoState extends State<ButtonsDemo> { ...@@ -201,7 +201,7 @@ class _ButtonsDemoState extends State<ButtonsDemo> {
values: _demos, values: _demos,
child: new Scaffold( child: new Scaffold(
appBar: new AppBar( appBar: new AppBar(
title: new Text("Buttons"), title: new Text('Buttons'),
tabBar: new TabBar<_ButtonDemo>( tabBar: new TabBar<_ButtonDemo>(
isScrollable: true, isScrollable: true,
labels: new Map<_ButtonDemo, TabLabel>.fromIterable(_demos, value: (_ButtonDemo demo) => demo.tabLabel) labels: new Map<_ButtonDemo, TabLabel>.fromIterable(_demos, value: (_ButtonDemo demo) => demo.tabLabel)
......
...@@ -120,7 +120,7 @@ class CardsDemo extends StatelessWidget { ...@@ -120,7 +120,7 @@ class CardsDemo extends StatelessWidget {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return new Scaffold( return new Scaffold(
appBar: new AppBar( appBar: new AppBar(
title: new Text("Travel Stream") title: new Text('Travel stream')
), ),
body: new Block( body: new Block(
padding: const EdgeInsets.only(top: 8.0, left: 8.0, right: 8.0), padding: const EdgeInsets.only(top: 8.0, left: 8.0, right: 8.0),
......
...@@ -38,7 +38,7 @@ class _ChipDemoState extends State<ChipDemo> { ...@@ -38,7 +38,7 @@ class _ChipDemoState extends State<ChipDemo> {
} }
return new Scaffold( return new Scaffold(
appBar: new AppBar(title: new Text("Chips")), appBar: new AppBar(title: new Text('Chips')),
body: new Block( body: new Block(
children: chips.map((Widget widget) { children: chips.map((Widget widget) {
return new Container( return new Container(
......
...@@ -116,7 +116,7 @@ class ColorsDemo extends StatelessWidget { ...@@ -116,7 +116,7 @@ class ColorsDemo extends StatelessWidget {
child: new Scaffold( child: new Scaffold(
appBar: new AppBar( appBar: new AppBar(
elevation: 0, elevation: 0,
title: new Text("Colors"), title: new Text('Colors'),
tabBar: new TabBar<ColorSwatch>( tabBar: new TabBar<ColorSwatch>(
isScrollable: true, isScrollable: true,
labels: new Map<ColorSwatch, TabLabel>.fromIterable(colorSwatches, value: (ColorSwatch swatch) { labels: new Map<ColorSwatch, TabLabel>.fromIterable(colorSwatches, value: (ColorSwatch swatch) {
......
...@@ -33,7 +33,7 @@ class _DatePickerDemoState extends State<DatePickerDemo> { ...@@ -33,7 +33,7 @@ class _DatePickerDemoState extends State<DatePickerDemo> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return return
new Scaffold( new Scaffold(
appBar: new AppBar(title: new Text("Date Picker")), appBar: new AppBar(title: new Text('Date picker')),
body: new Column( body: new Column(
children: <Widget>[ children: <Widget>[
new Text(new DateFormat.yMMMd().format(_selectedDate)), new Text(new DateFormat.yMMMd().format(_selectedDate)),
......
...@@ -119,7 +119,7 @@ class DialogDemoState extends State<DialogDemo> { ...@@ -119,7 +119,7 @@ class DialogDemoState extends State<DialogDemo> {
showDemoDialog/*<DialogDemoAction>*/( showDemoDialog/*<DialogDemoAction>*/(
context: context, context: context,
dialog: new Dialog( dialog: new Dialog(
title: new Text("Use Google's location service?"), title: new Text('Use Google\'s location service?'),
content: new Text( content: new Text(
_alertWithTitleText, _alertWithTitleText,
style: dialogTextStyle style: dialogTextStyle
......
...@@ -48,7 +48,7 @@ class _DrawingDemoState extends State<DrawingDemo> { ...@@ -48,7 +48,7 @@ class _DrawingDemoState extends State<DrawingDemo> {
return new Scaffold( return new Scaffold(
appBar: new AppBar( appBar: new AppBar(
title: new Text("Fancy Lines") title: new Text('Fancy lines')
), ),
body: body body: body
); );
......
...@@ -22,7 +22,7 @@ class _DropDownDemoState extends State<DropDownDemo> { ...@@ -22,7 +22,7 @@ class _DropDownDemoState extends State<DropDownDemo> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return new Scaffold( return new Scaffold(
appBar: new AppBar(title: new Text("Dropdown Button")), appBar: new AppBar(title: new Text('Drop-down button')),
body: new Center( body: new Center(
child: new DropDownButton<String>( child: new DropDownButton<String>(
items: buildItems(), items: buildItems(),
......
...@@ -20,7 +20,7 @@ class FitnessDemo extends StatelessWidget { ...@@ -20,7 +20,7 @@ class FitnessDemo extends StatelessWidget {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return new Scaffold( return new Scaffold(
appBar: new AppBar( appBar: new AppBar(
title: new Text("Fitness") title: new Text('Fitness')
), ),
body: new _FitnessDemoContents() body: new _FitnessDemoContents()
); );
...@@ -108,7 +108,7 @@ class _FitnessDemoContentsState extends State<_FitnessDemoContents> { ...@@ -108,7 +108,7 @@ class _FitnessDemoContentsState extends State<_FitnessDemoContents> {
), ),
new Padding( new Padding(
padding: new EdgeInsets.only(top: 20.0), padding: new EdgeInsets.only(top: 20.0),
child: new Text("JUMPING JACKS", style: Theme.of(context).textTheme.title) child: new Text('JUMPING JACKS', style: Theme.of(context).textTheme.title)
), ),
new Padding( new Padding(
padding: new EdgeInsets.only(top: 20.0, bottom: 20.0), padding: new EdgeInsets.only(top: 20.0, bottom: 20.0),
...@@ -186,11 +186,11 @@ class _FitnessDemoContentsState extends State<_FitnessDemoContents> { ...@@ -186,11 +186,11 @@ class _FitnessDemoContentsState extends State<_FitnessDemoContents> {
child: new Stack(children: <Widget>[ child: new Stack(children: <Widget>[
new _Fireworks(), new _Fireworks(),
new Dialog( new Dialog(
title: new Text("Awesome workout"), title: new Text('Awesome workout'),
content: new Text("You have completed $_count jumping jacks. Good going!"), content: new Text('You have completed $_count jumping jacks. Good going!'),
actions: <Widget>[ actions: <Widget>[
new FlatButton( new FlatButton(
child: new Text("SWEET"), child: new Text('SWEET'),
onPressed: () { Navigator.pop(context); } onPressed: () { Navigator.pop(context); }
) )
] ]
......
...@@ -113,11 +113,11 @@ class FlexibleSpaceDemoState extends State<FlexibleSpaceDemo> { ...@@ -113,11 +113,11 @@ class FlexibleSpaceDemoState extends State<FlexibleSpaceDemo> {
itemBuilder: (BuildContext context) => <PopupMenuItem<AppBarBehavior>>[ itemBuilder: (BuildContext context) => <PopupMenuItem<AppBarBehavior>>[
new PopupMenuItem<AppBarBehavior>( new PopupMenuItem<AppBarBehavior>(
value: AppBarBehavior.scroll, value: AppBarBehavior.scroll,
child: new Text('AppBar scrolls away') child: new Text('Toolbar scrolls away')
), ),
new PopupMenuItem<AppBarBehavior>( new PopupMenuItem<AppBarBehavior>(
value: AppBarBehavior.under, value: AppBarBehavior.under,
child: new Text('AppBar stays put') child: new Text('Toolbar stays put')
) )
] ]
) )
......
...@@ -149,7 +149,7 @@ class FullScreenDialogDemoState extends State<FullScreenDialogDemo> { ...@@ -149,7 +149,7 @@ class FullScreenDialogDemoState extends State<FullScreenDialogDemo> {
icon: Icons.clear, icon: Icons.clear,
onPressed: () { handleDismissButton(context); } onPressed: () { handleDismissButton(context); }
), ),
title: new Text('New Event'), title: new Text('New event'),
actions: <Widget> [ actions: <Widget> [
new FlatButton( new FlatButton(
child: new Text('SAVE', style: theme.textTheme.body1.copyWith(color: Colors.white)), child: new Text('SAVE', style: theme.textTheme.body1.copyWith(color: Colors.white)),
......
...@@ -180,7 +180,7 @@ class GridListDemoState extends State<GridListDemo> { ...@@ -180,7 +180,7 @@ class GridListDemoState extends State<GridListDemo> {
final Orientation orientation = MediaQuery.of(context).orientation; final Orientation orientation = MediaQuery.of(context).orientation;
return new Scaffold( return new Scaffold(
appBar: new AppBar( appBar: new AppBar(
title: new Text('Grid List'), title: new Text('Grid list'),
actions: <Widget>[ actions: <Widget>[
new IconButton( new IconButton(
icon: Icons.more_vert, icon: Icons.more_vert,
......
...@@ -130,7 +130,7 @@ class LeaveBehindDemoState extends State<LeaveBehindDemo> { ...@@ -130,7 +130,7 @@ class LeaveBehindDemoState extends State<LeaveBehindDemo> {
return new Scaffold( return new Scaffold(
key: _scaffoldKey, key: _scaffoldKey,
appBar: new AppBar( appBar: new AppBar(
title: new Text('Swipe Items to Dismiss'), title: new Text('Swipe items to dismiss'),
actions: <Widget>[ actions: <Widget>[
new PopupMenuButton<LeaveBehindDemoAction>( new PopupMenuButton<LeaveBehindDemoAction>(
onSelected: handleDemoAction, onSelected: handleDemoAction,
......
...@@ -77,7 +77,7 @@ class ListDemoState extends State<ListDemo> { ...@@ -77,7 +77,7 @@ class ListDemoState extends State<ListDemo> {
), ),
new ListItem( new ListItem(
dense: true, dense: true,
title: new Text('Show Avatar'), title: new Text('Show avatar'),
trailing: new Checkbox( trailing: new Checkbox(
value: _showAvatars, value: _showAvatars,
onChanged: (bool value) { onChanged: (bool value) {
...@@ -90,7 +90,7 @@ class ListDemoState extends State<ListDemo> { ...@@ -90,7 +90,7 @@ class ListDemoState extends State<ListDemo> {
), ),
new ListItem( new ListItem(
dense: true, dense: true,
title: new Text('Show Icon'), title: new Text('Show icon'),
trailing: new Checkbox( trailing: new Checkbox(
value: _showIcons, value: _showIcons,
onChanged: (bool value) { onChanged: (bool value) {
...@@ -103,7 +103,7 @@ class ListDemoState extends State<ListDemo> { ...@@ -103,7 +103,7 @@ class ListDemoState extends State<ListDemo> {
), ),
new ListItem( new ListItem(
dense: true, dense: true,
title: new Text('Show Dividers'), title: new Text('Show dividers'),
trailing: new Checkbox( trailing: new Checkbox(
value: _showDividers, value: _showDividers,
onChanged: (bool value) { onChanged: (bool value) {
...@@ -116,7 +116,7 @@ class ListDemoState extends State<ListDemo> { ...@@ -116,7 +116,7 @@ class ListDemoState extends State<ListDemo> {
), ),
new ListItem( new ListItem(
dense: true, dense: true,
title: new Text('Dense Layout'), title: new Text('Dense layout'),
trailing: new Checkbox( trailing: new Checkbox(
value: _dense, value: _dense,
onChanged: (bool value) { onChanged: (bool value) {
...@@ -148,7 +148,7 @@ class ListDemoState extends State<ListDemo> { ...@@ -148,7 +148,7 @@ class ListDemoState extends State<ListDemo> {
isThreeLine: _itemSize == ListDemoItemSize.threeLine, isThreeLine: _itemSize == ListDemoItemSize.threeLine,
dense: _dense, dense: _dense,
leading: _showAvatars ? new CircleAvatar(child: new Text(item)) : null, leading: _showAvatars ? new CircleAvatar(child: new Text(item)) : null,
title: new Text('This item represents $item'), title: new Text('This item represents $item.'),
subtitle: secondary, subtitle: secondary,
trailing: _showIcons ? new Icon(icon: Icons.info, color: Theme.of(context).disabledColor) : null trailing: _showIcons ? new Icon(icon: Icons.info, color: Theme.of(context).disabledColor) : null
); );
...@@ -177,7 +177,7 @@ class ListDemoState extends State<ListDemo> { ...@@ -177,7 +177,7 @@ class ListDemoState extends State<ListDemo> {
return new Scaffold( return new Scaffold(
key: scaffoldKey, key: scaffoldKey,
appBar: new AppBar( appBar: new AppBar(
title: new Text('Scrolling List\n$itemSizeText$layoutText'), title: new Text('Scrolling list\n$itemSizeText$layoutText'),
actions: <Widget>[ actions: <Widget>[
new IconButton( new IconButton(
icon: Icons.sort_by_alpha, icon: Icons.sort_by_alpha,
......
...@@ -66,12 +66,12 @@ class MenuDemoState extends State<MenuDemo> { ...@@ -66,12 +66,12 @@ class MenuDemoState extends State<MenuDemo> {
onSelected: showMenuSelection, onSelected: showMenuSelection,
itemBuilder: (BuildContext context) => <PopupMenuItem<String>>[ itemBuilder: (BuildContext context) => <PopupMenuItem<String>>[
new PopupMenuItem<String>( new PopupMenuItem<String>(
value: 'AppBar Menu', value: 'Toolbar menu',
child: new Text('AppBar Menu') child: new Text('Toolbar menu')
), ),
new PopupMenuItem<String>( new PopupMenuItem<String>(
value: 'Right Here', value: 'Right here',
child: new Text('Right Here') child: new Text('Right here')
), ),
new PopupMenuItem<String>( new PopupMenuItem<String>(
value: 'Hooray!', value: 'Hooray!',
...@@ -133,7 +133,7 @@ class MenuDemoState extends State<MenuDemo> { ...@@ -133,7 +133,7 @@ class MenuDemoState extends State<MenuDemo> {
value: 'Get Link', value: 'Get Link',
child: new ListItem( child: new ListItem(
leading: new Icon(icon: Icons.link), leading: new Icon(icon: Icons.link),
title: new Text('Get Link') title: new Text('Get link')
) )
), ),
new PopupMenuDivider(), new PopupMenuDivider(),
......
...@@ -14,7 +14,7 @@ class ModalBottomSheetDemo extends StatelessWidget { ...@@ -14,7 +14,7 @@ class ModalBottomSheetDemo extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return new Scaffold( return new Scaffold(
appBar: new AppBar(title: new Text("Modal Bottom Sheet")), appBar: new AppBar(title: new Text('Modal bottom sheet')),
body: new Center( body: new Center(
child: new RaisedButton( child: new RaisedButton(
child: new Text('SHOW BOTTOM SHEET'), child: new Text('SHOW BOTTOM SHEET'),
...@@ -23,7 +23,7 @@ class ModalBottomSheetDemo extends StatelessWidget { ...@@ -23,7 +23,7 @@ class ModalBottomSheetDemo extends StatelessWidget {
return new Container( return new Container(
child: new Padding( child: new Padding(
padding: const EdgeInsets.all(32.0), padding: const EdgeInsets.all(32.0),
child: new Text("This is the modal bottom sheet. Click anywhere to dismiss.", style: textStyle) child: new Text('This is the modal bottom sheet. Click anywhere to dismiss.', style: textStyle)
) )
); );
}); });
......
...@@ -24,7 +24,7 @@ class PageSelectorDemo extends StatelessWidget { ...@@ -24,7 +24,7 @@ class PageSelectorDemo extends StatelessWidget {
]; ];
return new Scaffold( return new Scaffold(
appBar: new AppBar(title: new Text('Page Selector')), appBar: new AppBar(title: new Text('Page selector')),
body: new TabBarSelection<IconData>( body: new TabBarSelection<IconData>(
values: icons, values: icons,
child: new Builder( child: new Builder(
......
...@@ -38,7 +38,7 @@ class _PersistentBottomSheetDemoState extends State<PersistentBottomSheetDemo> { ...@@ -38,7 +38,7 @@ class _PersistentBottomSheetDemoState extends State<PersistentBottomSheetDemo> {
), ),
child: new Padding( child: new Padding(
padding: const EdgeInsets.all(32.0), padding: const EdgeInsets.all(32.0),
child: new Text("This is a Material persistent bottom sheet. Drag downwards to dismiss it.", style: textStyle) child: new Text('This is a Material persistent bottom sheet. Drag downwards to dismiss it.', style: textStyle)
) )
); );
}) })
...@@ -53,7 +53,7 @@ class _PersistentBottomSheetDemoState extends State<PersistentBottomSheetDemo> { ...@@ -53,7 +53,7 @@ class _PersistentBottomSheetDemoState extends State<PersistentBottomSheetDemo> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return new Scaffold( return new Scaffold(
key: _scaffoldKey, key: _scaffoldKey,
appBar: new AppBar(title: new Text("Persistent Bottom Sheet")), appBar: new AppBar(title: new Text('Persistent bottom sheet')),
floatingActionButton: new FloatingActionButton( floatingActionButton: new FloatingActionButton(
child: new Icon(icon: Icons.add), child: new Icon(icon: Icons.add),
backgroundColor: Colors.redAccent[200] backgroundColor: Colors.redAccent[200]
......
...@@ -73,7 +73,7 @@ class _ProgressIndicatorDemoState extends State<ProgressIndicatorDemo> { ...@@ -73,7 +73,7 @@ class _ProgressIndicatorDemoState extends State<ProgressIndicatorDemo> {
height: 30.0, height: 30.0,
child: new CircularProgressIndicator(value: animation.value) child: new CircularProgressIndicator(value: animation.value)
), ),
new Text("${(animation.value * 100.0).toStringAsFixed(1)}%" + (controller.isAnimating ? '' : ' (paused)')) new Text('${(animation.value * 100.0).toStringAsFixed(1)}%${ controller.isAnimating ? "" : " (paused)" }')
]; ];
return new Column( return new Column(
children: indicators children: indicators
...@@ -86,7 +86,7 @@ class _ProgressIndicatorDemoState extends State<ProgressIndicatorDemo> { ...@@ -86,7 +86,7 @@ class _ProgressIndicatorDemoState extends State<ProgressIndicatorDemo> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return new Scaffold( return new Scaffold(
appBar: new AppBar(title: new Text('Progress Indicators')), appBar: new AppBar(title: new Text('Progress indicators')),
body: new DefaultTextStyle( body: new DefaultTextStyle(
style: Theme.of(context).textTheme.title, style: Theme.of(context).textTheme.title,
child: new GestureDetector( child: new GestureDetector(
......
...@@ -49,22 +49,22 @@ class ScrollableTabsDemoState extends State<ScrollableTabsDemo> { ...@@ -49,22 +49,22 @@ class ScrollableTabsDemoState extends State<ScrollableTabsDemo> {
values: icons, values: icons,
child: new Scaffold( child: new Scaffold(
appBar: new AppBar( appBar: new AppBar(
title: new Text('Scrollable Tabs'), title: new Text('Scrollable tabs'),
actions: <Widget>[ actions: <Widget>[
new PopupMenuButton<TabsDemoStyle>( new PopupMenuButton<TabsDemoStyle>(
onSelected: changeDemoStyle, onSelected: changeDemoStyle,
itemBuilder: (BuildContext context) => <PopupMenuItem<TabsDemoStyle>>[ itemBuilder: (BuildContext context) => <PopupMenuItem<TabsDemoStyle>>[
new PopupMenuItem<TabsDemoStyle>( new PopupMenuItem<TabsDemoStyle>(
value: TabsDemoStyle.iconsAndText, value: TabsDemoStyle.iconsAndText,
child: new Text('Icons and Text') child: new Text('Icons and text')
), ),
new PopupMenuItem<TabsDemoStyle>( new PopupMenuItem<TabsDemoStyle>(
value: TabsDemoStyle.iconsOnly, value: TabsDemoStyle.iconsOnly,
child: new Text('Icons Only') child: new Text('Icons only')
), ),
new PopupMenuItem<TabsDemoStyle>( new PopupMenuItem<TabsDemoStyle>(
value: TabsDemoStyle.textOnly, value: TabsDemoStyle.textOnly,
child: new Text('Text Only') child: new Text('Text only')
), ),
] ]
) )
......
...@@ -116,7 +116,7 @@ class ScrollingTechniquesDemo extends StatelessWidget { ...@@ -116,7 +116,7 @@ class ScrollingTechniquesDemo extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return new Scaffold( return new Scaffold(
appBar: new AppBar(title: new Text('Scrolling Techniques')), appBar: new AppBar(title: new Text('Scrolling techniques')),
body: new Padding( body: new Padding(
padding: const EdgeInsets.symmetric(horizontal: 16.0), padding: const EdgeInsets.symmetric(horizontal: 16.0),
child: new Block( child: new Block(
......
...@@ -35,7 +35,7 @@ class _SelectionControlsDemoState extends State<SelectionControlsDemo> { ...@@ -35,7 +35,7 @@ class _SelectionControlsDemoState extends State<SelectionControlsDemo> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return new Scaffold( return new Scaffold(
appBar: new AppBar(title: new Text("Selection Controls")), appBar: new AppBar(title: new Text('Selection controls')),
body: new Column( body: new Column(
children: <Widget>[ children: <Widget>[
new Row( new Row(
......
...@@ -40,12 +40,12 @@ class _SnackBarDemoState extends State<SnackBarDemo> { ...@@ -40,12 +40,12 @@ class _SnackBarDemoState extends State<SnackBarDemo> {
onPressed: () { onPressed: () {
final int thisSnackBarIndex = _snackBarIndex++; final int thisSnackBarIndex = _snackBarIndex++;
Scaffold.of(context).showSnackBar(new SnackBar( Scaffold.of(context).showSnackBar(new SnackBar(
content: new Text('This is SnackBar #$thisSnackBarIndex'), content: new Text('This is snackbar #$thisSnackBarIndex.'),
action: new SnackBarAction( action: new SnackBarAction(
label: 'ACTION', label: 'ACTION',
onPressed: () { onPressed: () {
Scaffold.of(context).showSnackBar(new SnackBar( Scaffold.of(context).showSnackBar(new SnackBar(
content: new Text("You pressed SnackBar $thisSnackBarIndex's Action") content: new Text('You pressed snackbar $thisSnackBarIndex\'s action.')
)); ));
} }
) )
...@@ -70,7 +70,7 @@ class _SnackBarDemoState extends State<SnackBarDemo> { ...@@ -70,7 +70,7 @@ class _SnackBarDemoState extends State<SnackBarDemo> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return new Scaffold( return new Scaffold(
appBar: new AppBar( appBar: new AppBar(
title: new Text('SnackBar') title: new Text('Snackbar')
), ),
body: new Builder( body: new Builder(
// Create an inner BuildContext so that the snackBar onPressed methods // Create an inner BuildContext so that the snackBar onPressed methods
......
...@@ -48,7 +48,7 @@ class TabsDemoState extends State<TabsDemo> { ...@@ -48,7 +48,7 @@ class TabsDemoState extends State<TabsDemo> {
scrollableKey: _selectedPage.key, scrollableKey: _selectedPage.key,
appBarBehavior: AppBarBehavior.under, appBarBehavior: AppBarBehavior.under,
appBar: new AppBar( appBar: new AppBar(
title: new Text('Tabs and Scrolling'), title: new Text('Tabs and scrolling'),
tabBar: new TabBar<_Page>( tabBar: new TabBar<_Page>(
labels: new Map<_Page, TabLabel>.fromIterable(_pages, value: (_Page page) { labels: new Map<_Page, TabLabel>.fromIterable(_pages, value: (_Page page) {
return new TabLabel(text: page.label); return new TabLabel(text: page.label);
......
...@@ -97,7 +97,7 @@ class _TabsFabDemoState extends State<TabsFabDemo> { ...@@ -97,7 +97,7 @@ class _TabsFabDemoState extends State<TabsFabDemo> {
child: new Scaffold( child: new Scaffold(
key: scaffoldKey, key: scaffoldKey,
appBar: new AppBar( appBar: new AppBar(
title: new Text("FAB per Tab"), title: new Text('FAB per tab'),
tabBar: new TabBar<_Page>( tabBar: new TabBar<_Page>(
labels: new Map<_Page, TabLabel>.fromIterable(pages, value: (_Page page) => page.tabLabel) labels: new Map<_Page, TabLabel>.fromIterable(pages, value: (_Page page) => page.tabLabel)
) )
......
...@@ -61,7 +61,7 @@ class TextFieldDemoState extends State<TextFieldDemo> { ...@@ -61,7 +61,7 @@ class TextFieldDemoState extends State<TextFieldDemo> {
return new Scaffold( return new Scaffold(
key: _scaffoldKey, key: _scaffoldKey,
appBar: new AppBar( appBar: new AppBar(
title: new Text('Text Fields') title: new Text('Text fields')
), ),
body: new Form( body: new Form(
onSubmitted: _handleSubmitted, onSubmitted: _handleSubmitted,
......
...@@ -29,7 +29,7 @@ class _TimePickerDemoState extends State<TimePickerDemo> { ...@@ -29,7 +29,7 @@ class _TimePickerDemoState extends State<TimePickerDemo> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return new Scaffold( return new Scaffold(
appBar: new AppBar(title: new Text("Time Picker")), appBar: new AppBar(title: new Text('Time picker')),
body: new Column( body: new Column(
children: <Widget>[ children: <Widget>[
new Text('$_selectedTime'), new Text('$_selectedTime'),
......
...@@ -34,7 +34,7 @@ class TooltipDemo extends StatelessWidget { ...@@ -34,7 +34,7 @@ class TooltipDemo extends StatelessWidget {
color: theme.primaryColor color: theme.primaryColor
) )
), ),
new Text(' icon', style: theme.textTheme.subhead) new Text(' icon.', style: theme.textTheme.subhead)
] ]
), ),
new Center( new Center(
...@@ -45,7 +45,7 @@ class TooltipDemo extends StatelessWidget { ...@@ -45,7 +45,7 @@ class TooltipDemo extends StatelessWidget {
tooltip: 'place a phone call', tooltip: 'place a phone call',
onPressed: () { onPressed: () {
Scaffold.of(context).showSnackBar(new SnackBar( Scaffold.of(context).showSnackBar(new SnackBar(
content: new Text('That was an ordinary tap') content: new Text('That was an ordinary tap.')
)); ));
} }
) )
......
...@@ -8,7 +8,7 @@ class TwoLevelListDemo extends StatelessWidget { ...@@ -8,7 +8,7 @@ class TwoLevelListDemo extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return new Scaffold( return new Scaffold(
appBar: new AppBar(title: new Text('Expand/Collapse List Control')), appBar: new AppBar(title: new Text('Expand/collapse list control')),
body: new TwoLevelList( body: new TwoLevelList(
type: MaterialListType.oneLine, type: MaterialListType.oneLine,
items: <Widget>[ items: <Widget>[
......
...@@ -65,7 +65,7 @@ class _WeatherDemoState extends State<WeatherDemo> { ...@@ -65,7 +65,7 @@ class _WeatherDemoState extends State<WeatherDemo> {
if (!assetsLoaded) { if (!assetsLoaded) {
return new Scaffold( return new Scaffold(
appBar: new AppBar( appBar: new AppBar(
title: new Text("Weather") title: new Text('Weather')
), ),
body: new Container( body: new Container(
decoration: new BoxDecoration( decoration: new BoxDecoration(
...@@ -77,7 +77,7 @@ class _WeatherDemoState extends State<WeatherDemo> { ...@@ -77,7 +77,7 @@ class _WeatherDemoState extends State<WeatherDemo> {
return new Scaffold( return new Scaffold(
appBar: new AppBar( appBar: new AppBar(
title: new Text("Weather") title: new Text('Weather')
), ),
body: new Material( body: new Material(
child: new Stack( child: new Stack(
......
...@@ -85,7 +85,7 @@ class GalleryHomeState extends State<GalleryHome> { ...@@ -85,7 +85,7 @@ class GalleryHomeState extends State<GalleryHome> {
expandedHeight: _kFlexibleSpaceMaxHeight, expandedHeight: _kFlexibleSpaceMaxHeight,
flexibleSpace: (BuildContext context) => new FlexibleSpaceBar( flexibleSpace: (BuildContext context) => new FlexibleSpaceBar(
image: new GalleryHeader(), image: new GalleryHeader(),
title: new Text("Flutter Gallery") title: new Text("Flutter gallery")
) )
), ),
scrollableKey: _listKey, scrollableKey: _listKey,
...@@ -101,38 +101,38 @@ class GalleryHomeState extends State<GalleryHome> { ...@@ -101,38 +101,38 @@ class GalleryHomeState extends State<GalleryHome> {
children: <Widget>[ children: <Widget>[
new GalleryItem(title: "Weather", builder: () => new WeatherDemo()), new GalleryItem(title: "Weather", builder: () => new WeatherDemo()),
new GalleryItem(title: "Fitness", builder: () => new FitnessDemo()), new GalleryItem(title: "Fitness", builder: () => new FitnessDemo()),
new GalleryItem(title: "Fancy Lines", builder: () => new DrawingDemo()), new GalleryItem(title: "Fancy lines", builder: () => new DrawingDemo()),
] ]
), ),
new TwoLevelSublist( new TwoLevelSublist(
leading: new Icon(icon: Icons.extension), leading: new Icon(icon: Icons.extension),
title: new Text("Components"), title: new Text("Components"),
children: <Widget>[ children: <Widget>[
new GalleryItem(title: 'App Bar', builder: () => new FlexibleSpaceDemo()),
new GalleryItem(title: 'Buttons', builder: () => new ButtonsDemo()), new GalleryItem(title: 'Buttons', builder: () => new ButtonsDemo()),
new GalleryItem(title: 'Buttons: Floating Action Button', builder: () => new TabsFabDemo()), new GalleryItem(title: 'Buttons: floating action button', builder: () => new TabsFabDemo()),
new GalleryItem(title: 'Cards', builder: () => new CardsDemo()), new GalleryItem(title: 'Cards', builder: () => new CardsDemo()),
new GalleryItem(title: 'Chips', builder: () => new ChipDemo()), new GalleryItem(title: 'Chips', builder: () => new ChipDemo()),
new GalleryItem(title: 'Date Picker', builder: () => new DatePickerDemo()), new GalleryItem(title: 'Date picker', builder: () => new DatePickerDemo()),
new GalleryItem(title: 'Dialog', builder: () => new DialogDemo()), new GalleryItem(title: 'Dialog', builder: () => new DialogDemo()),
new GalleryItem(title: 'Dropdown Button', builder: () => new DropDownDemo()), new GalleryItem(title: 'Drop-down button', builder: () => new DropDownDemo()),
new GalleryItem(title: 'Expand/Collapse List Control', builder: () => new TwoLevelListDemo()), new GalleryItem(title: 'Expand/collapse list control', builder: () => new TwoLevelListDemo()),
new GalleryItem(title: 'Grid', builder: () => new GridListDemo()), new GalleryItem(title: 'Grid', builder: () => new GridListDemo()),
new GalleryItem(title: 'Icons', builder: () => new IconsDemo()), new GalleryItem(title: 'Icons', builder: () => new IconsDemo()),
new GalleryItem(title: 'Leave-behind List Items', builder: () => new LeaveBehindDemo()), new GalleryItem(title: 'Leave-behind list items', builder: () => new LeaveBehindDemo()),
new GalleryItem(title: 'List', builder: () => new ListDemo()), new GalleryItem(title: 'List', builder: () => new ListDemo()),
new GalleryItem(title: 'Modal Bottom Sheet', builder: () => new ModalBottomSheetDemo()),
new GalleryItem(title: 'Menus', builder: () => new MenuDemo()), new GalleryItem(title: 'Menus', builder: () => new MenuDemo()),
new GalleryItem(title: 'Page Selector', builder: () => new PageSelectorDemo()), new GalleryItem(title: 'Modal bottom sheet', builder: () => new ModalBottomSheetDemo()),
new GalleryItem(title: 'Persistent Bottom Sheet', builder: () => new PersistentBottomSheetDemo()), new GalleryItem(title: 'Page selector', builder: () => new PageSelectorDemo()),
new GalleryItem(title: 'Progress Indicators', builder: () => new ProgressIndicatorDemo()), new GalleryItem(title: 'Persistent bottom sheet', builder: () => new PersistentBottomSheetDemo()),
new GalleryItem(title: 'Scrollable Tabs', builder: () => new ScrollableTabsDemo()), new GalleryItem(title: 'Progress indicators', builder: () => new ProgressIndicatorDemo()),
new GalleryItem(title: 'Selection Controls', builder: () => new SelectionControlsDemo()), new GalleryItem(title: 'Scrollable tabs', builder: () => new ScrollableTabsDemo()),
new GalleryItem(title: 'Selection controls', builder: () => new SelectionControlsDemo()),
new GalleryItem(title: 'Sliders', builder: () => new SliderDemo()), new GalleryItem(title: 'Sliders', builder: () => new SliderDemo()),
new GalleryItem(title: 'SnackBar', builder: () => new SnackBarDemo()), new GalleryItem(title: 'Snackbar', builder: () => new SnackBarDemo()),
new GalleryItem(title: 'Tabs', builder: () => new TabsDemo()), new GalleryItem(title: 'Tabs', builder: () => new TabsDemo()),
new GalleryItem(title: 'Text Fields', builder: () => new TextFieldDemo()), new GalleryItem(title: 'Text fields', builder: () => new TextFieldDemo()),
new GalleryItem(title: 'Time Picker', builder: () => new TimePickerDemo()), new GalleryItem(title: 'Time picker', builder: () => new TimePickerDemo()),
new GalleryItem(title: 'Toolbar', builder: () => new FlexibleSpaceDemo()),
new GalleryItem(title: 'Tooltips', builder: () => new TooltipDemo()), new GalleryItem(title: 'Tooltips', builder: () => new TooltipDemo()),
] ]
), ),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment