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