Add missing trailing commas (#28673)
* add trailing commas on list/map/parameters
* add trailing commas on Invocation with nb of arg>1
* add commas for widget containing widgets
* add trailing commas if instantiation contains trailing comma
* revert bad change
diff --git a/examples/catalog/lib/animated_list.dart b/examples/catalog/lib/animated_list.dart
index 4aab2a4..e9c3084 100644
--- a/examples/catalog/lib/animated_list.dart
+++ b/examples/catalog/lib/animated_list.dart
@@ -157,7 +157,7 @@
@required this.animation,
this.onTap,
@required this.item,
- this.selected = false
+ this.selected = false,
}) : assert(animation != null),
assert(item != null && item >= 0),
assert(selected != null),
diff --git a/examples/catalog/lib/custom_semantics.dart b/examples/catalog/lib/custom_semantics.dart
index e8bd86c..0cb7a45 100644
--- a/examples/catalog/lib/custom_semantics.dart
+++ b/examples/catalog/lib/custom_semantics.dart
@@ -58,7 +58,7 @@
}).toList(),
),
),
- )
+ ),
);
}
@@ -91,7 +91,7 @@
'5 seconds',
'15 seconds',
'30 seconds',
- '1 minute'
+ '1 minute',
];
String timeout;
diff --git a/examples/flutter_gallery/lib/demo/animation/home.dart b/examples/flutter_gallery/lib/demo/animation/home.dart
index ae7a34e..bfeaeca 100644
--- a/examples/flutter_gallery/lib/demo/animation/home.dart
+++ b/examples/flutter_gallery/lib/demo/animation/home.dart
@@ -509,7 +509,7 @@
setState(() {
_maybeScroll(midScrollOffset, index, xOffset);
});
- }
+ },
),
));
}
@@ -614,7 +614,7 @@
tooltip: 'Back',
onPressed: () {
_handleBackButton(appBarMidScrollOffset);
- }
+ },
),
),
),
diff --git a/examples/flutter_gallery/lib/demo/calculator/home.dart b/examples/flutter_gallery/lib/demo/calculator/home.dart
index 2be02ec..84250f6 100644
--- a/examples/flutter_gallery/lib/demo/calculator/home.dart
+++ b/examples/flutter_gallery/lib/demo/calculator/home.dart
@@ -116,7 +116,7 @@
return Scaffold(
appBar: AppBar(
backgroundColor: Theme.of(context).canvasColor,
- elevation: 0.0
+ elevation: 0.0,
),
body: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
@@ -124,15 +124,15 @@
// Give the key-pad 3/5 of the vertical space and the display 2/5.
Expanded(
flex: 2,
- child: CalcDisplay(content: _expression.toString())
+ child: CalcDisplay(content: _expression.toString()),
),
const Divider(height: 1.0),
Expanded(
flex: 3,
- child: KeyPad(calcState: this)
- )
- ]
- )
+ child: KeyPad(calcState: this),
+ ),
+ ],
+ ),
);
}
}
@@ -147,8 +147,8 @@
return Center(
child: Text(
content,
- style: const TextStyle(fontSize: 24.0)
- )
+ style: const TextStyle(fontSize: 24.0),
+ ),
);
}
}
@@ -180,25 +180,25 @@
KeyRow(<Widget>[
NumberKey(7, calcState),
NumberKey(8, calcState),
- NumberKey(9, calcState)
+ NumberKey(9, calcState),
]),
KeyRow(<Widget>[
NumberKey(4, calcState),
NumberKey(5, calcState),
- NumberKey(6, calcState)
+ NumberKey(6, calcState),
]),
KeyRow(<Widget>[
NumberKey(1, calcState),
NumberKey(2, calcState),
- NumberKey(3, calcState)
+ NumberKey(3, calcState),
]),
KeyRow(<Widget>[
CalcKey('.', calcState.handlePointTap),
NumberKey(0, calcState),
CalcKey('=', calcState.handleEqualsTap),
- ])
- ]
- )
+ ]),
+ ],
+ ),
),
Expanded(
child: Material(
@@ -209,14 +209,14 @@
CalcKey('\u00F7', calcState.handleDivTap),
CalcKey('\u00D7', calcState.handleMultTap),
CalcKey('-', calcState.handleMinusTap),
- CalcKey('+', calcState.handlePlusTap)
- ]
- )
- )
+ CalcKey('+', calcState.handlePlusTap),
+ ],
+ ),
+ ),
),
- ]
- )
- )
+ ],
+ ),
+ ),
);
}
}
@@ -231,8 +231,8 @@
return Expanded(
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
- children: keys
- )
+ children: keys,
+ ),
);
}
}
@@ -254,10 +254,10 @@
text,
style: TextStyle(
fontSize: (orientation == Orientation.portrait) ? 32.0 : 24.0
- )
- )
- )
- )
+ ),
+ ),
+ ),
+ ),
);
}
}
diff --git a/examples/flutter_gallery/lib/demo/contacts_demo.dart b/examples/flutter_gallery/lib/demo/contacts_demo.dart
index 5566f8c..66403ef 100644
--- a/examples/flutter_gallery/lib/demo/contacts_demo.dart
+++ b/examples/flutter_gallery/lib/demo/contacts_demo.dart
@@ -30,9 +30,9 @@
Container(
padding: const EdgeInsets.symmetric(vertical: 24.0),
width: 72.0,
- child: Icon(icon, color: themeData.primaryColor)
+ child: Icon(icon, color: themeData.primaryColor),
),
- Expanded(child: Column(children: children))
+ Expanded(child: Column(children: children)),
],
),
),
@@ -61,9 +61,9 @@
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
- children: columnChildren
- )
- )
+ children: columnChildren,
+ ),
+ ),
];
if (icon != null) {
rowChildren.add(SizedBox(
@@ -71,8 +71,8 @@
child: IconButton(
icon: Icon(icon),
color: themeData.primaryColor,
- onPressed: onPressed
- )
+ onPressed: onPressed,
+ ),
));
}
return MergeSemantics(
@@ -80,8 +80,8 @@
padding: const EdgeInsets.symmetric(vertical: 16.0),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
- children: rowChildren
- )
+ children: rowChildren,
+ ),
),
);
}
@@ -125,7 +125,7 @@
tooltip: 'Edit',
onPressed: () {
_scaffoldKey.currentState.showSnackBar(const SnackBar(
- content: Text("Editing isn't supported in this screen.")
+ content: Text("Editing isn't supported in this screen."),
));
},
),
@@ -138,19 +138,19 @@
itemBuilder: (BuildContext context) => <PopupMenuItem<AppBarBehavior>>[
const PopupMenuItem<AppBarBehavior>(
value: AppBarBehavior.normal,
- child: Text('App bar scrolls away')
+ child: Text('App bar scrolls away'),
),
const PopupMenuItem<AppBarBehavior>(
value: AppBarBehavior.pinned,
- child: Text('App bar stays put')
+ child: Text('App bar stays put'),
),
const PopupMenuItem<AppBarBehavior>(
value: AppBarBehavior.floating,
- child: Text('App bar floats')
+ child: Text('App bar floats'),
),
const PopupMenuItem<AppBarBehavior>(
value: AppBarBehavior.snapping,
- child: Text('App bar snaps')
+ child: Text('App bar snaps'),
),
],
),
@@ -193,7 +193,7 @@
tooltip: 'Send message',
onPressed: () {
_scaffoldKey.currentState.showSnackBar(const SnackBar(
- content: Text('Pretend that this opened your SMS application.')
+ content: Text('Pretend that this opened your SMS application.'),
));
},
lines: const <String>[
@@ -206,7 +206,7 @@
tooltip: 'Send message',
onPressed: () {
_scaffoldKey.currentState.showSnackBar(const SnackBar(
- content: Text('A messaging app appears.')
+ content: Text('A messaging app appears.'),
));
},
lines: const <String>[
@@ -219,7 +219,7 @@
tooltip: 'Send message',
onPressed: () {
_scaffoldKey.currentState.showSnackBar(const SnackBar(
- content: Text('Imagine if you will, a messaging application.')
+ content: Text('Imagine if you will, a messaging application.'),
));
},
lines: const <String>[
@@ -238,7 +238,7 @@
tooltip: 'Send personal e-mail',
onPressed: () {
_scaffoldKey.currentState.showSnackBar(const SnackBar(
- content: Text('Here, your e-mail application would open.')
+ content: Text('Here, your e-mail application would open.'),
));
},
lines: const <String>[
@@ -251,7 +251,7 @@
tooltip: 'Send work e-mail',
onPressed: () {
_scaffoldKey.currentState.showSnackBar(const SnackBar(
- content: Text('Summon your favorite e-mail application here.')
+ content: Text('Summon your favorite e-mail application here.'),
));
},
lines: const <String>[
@@ -269,7 +269,7 @@
tooltip: 'Open map',
onPressed: () {
_scaffoldKey.currentState.showSnackBar(const SnackBar(
- content: Text('This would show a map of San Francisco.')
+ content: Text('This would show a map of San Francisco.'),
));
},
lines: const <String>[
@@ -283,7 +283,7 @@
tooltip: 'Open map',
onPressed: () {
_scaffoldKey.currentState.showSnackBar(const SnackBar(
- content: Text('This would show a map of Mountain View.')
+ content: Text('This would show a map of Mountain View.'),
));
},
lines: const <String>[
@@ -297,7 +297,7 @@
tooltip: 'Open map',
onPressed: () {
_scaffoldKey.currentState.showSnackBar(const SnackBar(
- content: Text('This would also show a map, if this was not a demo.')
+ content: Text('This would also show a map, if this was not a demo.'),
));
},
lines: const <String>[
diff --git a/examples/flutter_gallery/lib/demo/cupertino/cupertino_alert_demo.dart b/examples/flutter_gallery/lib/demo/cupertino/cupertino_alert_demo.dart
index c8051f2..17fc4cc 100644
--- a/examples/flutter_gallery/lib/demo/cupertino/cupertino_alert_demo.dart
+++ b/examples/flutter_gallery/lib/demo/cupertino/cupertino_alert_demo.dart
@@ -178,7 +178,7 @@
onPressed: () {
Navigator.pop(context, 'Cancel');
},
- )
+ ),
),
);
},
diff --git a/examples/flutter_gallery/lib/demo/cupertino/cupertino_buttons_demo.dart b/examples/flutter_gallery/lib/demo/cupertino/cupertino_buttons_demo.dart
index 9ec8580..8bddc8c 100644
--- a/examples/flutter_gallery/lib/demo/cupertino/cupertino_buttons_demo.dart
+++ b/examples/flutter_gallery/lib/demo/cupertino/cupertino_buttons_demo.dart
@@ -56,7 +56,7 @@
child: const Text('Cupertino Button'),
onPressed: () {
setState(() { _pressedCount += 1; });
- }
+ },
),
const CupertinoButton(
child: Text('Disabled'),
@@ -70,7 +70,7 @@
child: const Text('With Background'),
onPressed: () {
setState(() { _pressedCount += 1; });
- }
+ },
),
const Padding(padding: EdgeInsets.all(12.0)),
const CupertinoButton.filled(
@@ -83,7 +83,7 @@
],
),
),
- )
+ ),
);
}
}
diff --git a/examples/flutter_gallery/lib/demo/cupertino/cupertino_navigation_demo.dart b/examples/flutter_gallery/lib/demo/cupertino/cupertino_navigation_demo.dart
index f6e0263..2655bee 100644
--- a/examples/flutter_gallery/lib/demo/cupertino/cupertino_navigation_demo.dart
+++ b/examples/flutter_gallery/lib/demo/cupertino/cupertino_navigation_demo.dart
@@ -78,7 +78,7 @@
builder: (BuildContext context) {
return CupertinoDemoTab1(
colorItems: colorItems,
- colorNameItems: colorNameItems
+ colorNameItems: colorNameItems,
);
},
defaultTitle: 'Colors',
@@ -750,7 +750,7 @@
Text(
'Sign in',
style: TextStyle(color: CupertinoTheme.of(context).primaryColor),
- )
+ ),
],
),
),
diff --git a/examples/flutter_gallery/lib/demo/cupertino/cupertino_refresh_demo.dart b/examples/flutter_gallery/lib/demo/cupertino/cupertino_refresh_demo.dart
index 4ca14fb..a3a7385 100644
--- a/examples/flutter_gallery/lib/demo/cupertino/cupertino_refresh_demo.dart
+++ b/examples/flutter_gallery/lib/demo/cupertino/cupertino_refresh_demo.dart
@@ -32,7 +32,7 @@
return contacts[random.nextInt(contacts.length)]
// Randomly adds a telephone icon next to the contact or not.
..add(random.nextBool().toString());
- }
+ },
);
}
diff --git a/examples/flutter_gallery/lib/demo/cupertino/cupertino_slider_demo.dart b/examples/flutter_gallery/lib/demo/cupertino/cupertino_slider_demo.dart
index e643daf..bce7687 100644
--- a/examples/flutter_gallery/lib/demo/cupertino/cupertino_slider_demo.dart
+++ b/examples/flutter_gallery/lib/demo/cupertino/cupertino_slider_demo.dart
@@ -46,10 +46,10 @@
setState(() {
_value = value;
});
- }
+ },
),
Text('Cupertino Continuous: ${_value.toStringAsFixed(1)}'),
- ]
+ ],
),
Column(
mainAxisSize: MainAxisSize.min,
@@ -63,10 +63,10 @@
setState(() {
_discreteValue = value;
});
- }
+ },
),
Text('Cupertino Discrete: $_discreteValue'),
- ]
+ ],
),
],
),
diff --git a/examples/flutter_gallery/lib/demo/fortnightly/fortnightly.dart b/examples/flutter_gallery/lib/demo/fortnightly/fortnightly.dart
index 28a4f3c..f8dcde8 100644
--- a/examples/flutter_gallery/lib/demo/fortnightly/fortnightly.dart
+++ b/examples/flutter_gallery/lib/demo/fortnightly/fortnightly.dart
@@ -116,7 +116,7 @@
Text(
' ¬ ',
// TODO(larche): Replace textTheme.display3.color with a ColorScheme value when known.
- style: textTheme.overline.apply(color: textTheme.display3.color)
+ style: textTheme.overline.apply(color: textTheme.display3.color),
),
Text(
'CULTURE',
@@ -160,7 +160,7 @@
fontWeight: FontWeight.w500,
color: Colors.black,
),
- )
+ ),
],
),
),
@@ -170,7 +170,7 @@
),
],
),
- )
+ ),
],
),
),
diff --git a/examples/flutter_gallery/lib/demo/images_demo.dart b/examples/flutter_gallery/lib/demo/images_demo.dart
index c214d2a..9863a2b 100644
--- a/examples/flutter_gallery/lib/demo/images_demo.dart
+++ b/examples/flutter_gallery/lib/demo/images_demo.dart
@@ -34,7 +34,7 @@
),
),
),
- ]
+ ],
);
}
}
diff --git a/examples/flutter_gallery/lib/demo/material/bottom_app_bar_demo.dart b/examples/flutter_gallery/lib/demo/material/bottom_app_bar_demo.dart
index 0baef79..71d89bc 100644
--- a/examples/flutter_gallery/lib/demo/material/bottom_app_bar_demo.dart
+++ b/examples/flutter_gallery/lib/demo/material/bottom_app_bar_demo.dart
@@ -256,7 +256,7 @@
),
),
),
- ]
+ ],
),
),
);
@@ -333,7 +333,7 @@
const _DemoBottomAppBar({
this.color,
this.fabLocation,
- this.shape
+ this.shape,
});
final Color color;
diff --git a/examples/flutter_gallery/lib/demo/material/bottom_navigation_demo.dart b/examples/flutter_gallery/lib/demo/material/bottom_navigation_demo.dart
index a23e5f0..bbec6c6 100644
--- a/examples/flutter_gallery/lib/demo/material/bottom_navigation_demo.dart
+++ b/examples/flutter_gallery/lib/demo/material/bottom_navigation_demo.dart
@@ -96,7 +96,7 @@
height: iconTheme.size - 8.0,
decoration: BoxDecoration(
border: Border.all(color: iconTheme.color, width: 2.0),
- )
+ ),
);
}
}
@@ -150,7 +150,7 @@
title: 'Event',
color: Colors.pink,
vsync: this,
- )
+ ),
];
_navigationViews[_currentIndex].controller.value = 1.0;
@@ -218,13 +218,13 @@
const PopupMenuItem<BottomNavigationBarType>(
value: BottomNavigationBarType.shifting,
child: Text('Shifting'),
- )
+ ),
],
- )
+ ),
],
),
body: Center(
- child: _buildTransitionsStack()
+ child: _buildTransitionsStack(),
),
bottomNavigationBar: botNavBar,
);
diff --git a/examples/flutter_gallery/lib/demo/material/buttons_demo.dart b/examples/flutter_gallery/lib/demo/material/buttons_demo.dart
index 4b5f079..7ae4ff4 100644
--- a/examples/flutter_gallery/lib/demo/material/buttons_demo.dart
+++ b/examples/flutter_gallery/lib/demo/material/buttons_demo.dart
@@ -323,7 +323,7 @@
},
items: <String>[
'One', 'Two', 'Free', 'Four', 'Can', 'I', 'Have', 'A', 'Little',
- 'Bit', 'More', 'Five', 'Six', 'Seven', 'Eight', 'Nine', 'Ten'
+ 'Bit', 'More', 'Five', 'Six', 'Seven', 'Eight', 'Nine', 'Ten',
]
.map<DropdownMenuItem<String>>((String value) {
return DropdownMenuItem<String>(
@@ -363,7 +363,7 @@
semanticLabel: 'Thumbs not up',
),
onPressed: null,
- )
+ ),
]
.map<Widget>((Widget button) => SizedBox(width: 64.0, height: 64.0, child: button))
.toList(),
diff --git a/examples/flutter_gallery/lib/demo/material/cards_demo.dart b/examples/flutter_gallery/lib/demo/material/cards_demo.dart
index 427851d..dfc03f3 100644
--- a/examples/flutter_gallery/lib/demo/material/cards_demo.dart
+++ b/examples/flutter_gallery/lib/demo/material/cards_demo.dart
@@ -66,7 +66,7 @@
city: 'Thanjavur',
location: 'Thanjavur, Tamil Nadu',
type: CardDemoType.selectable,
- )
+ ),
];
class TravelDestinationItem extends StatelessWidget {
@@ -215,7 +215,7 @@
Icons.check_circle,
color: _isSelected ? colorScheme.primary : Colors.transparent,
),
- )
+ ),
),
],
),
@@ -232,7 +232,7 @@
class SectionTitle extends StatelessWidget {
const SectionTitle({
Key key,
- this.title
+ this.title,
}) : super(key: key);
final String title;
@@ -277,7 +277,7 @@
image: AssetImage(destination.assetName, package: destination.assetPackage),
fit: BoxFit.cover,
child: Container(),
- )
+ ),
),
Positioned(
bottom: 16.0,
@@ -408,8 +408,8 @@
margin: const EdgeInsets.only(bottom: 8.0),
child: child,
);
- }).toList()
- )
+ }).toList(),
+ ),
);
}
}
diff --git a/examples/flutter_gallery/lib/demo/material/chip_demo.dart b/examples/flutter_gallery/lib/demo/material/chip_demo.dart
index 3590c02..39c3e15 100644
--- a/examples/flutter_gallery/lib/demo/material/chip_demo.dart
+++ b/examples/flutter_gallery/lib/demo/material/chip_demo.dart
@@ -117,7 +117,7 @@
child: Column(
mainAxisSize: MainAxisSize.min,
children: cardChildren,
- )
+ ),
);
}
}
@@ -313,7 +313,7 @@
});
},
icon: const Icon(Icons.vignette, semanticLabel: 'Update border shape'),
- )
+ ),
],
),
body: ChipTheme(
diff --git a/examples/flutter_gallery/lib/demo/material/data_table_demo.dart b/examples/flutter_gallery/lib/demo/material/data_table_demo.dart
index 26342b2..5c0454a 100644
--- a/examples/flutter_gallery/lib/demo/material/data_table_demo.dart
+++ b/examples/flutter_gallery/lib/demo/material/data_table_demo.dart
@@ -121,7 +121,7 @@
DataCell(Text('${dessert.sodium}')),
DataCell(Text('${dessert.calcium}%')),
DataCell(Text('${dessert.iron}%')),
- ]
+ ],
);
}
@@ -185,50 +185,50 @@
columns: <DataColumn>[
DataColumn(
label: const Text('Dessert (100g serving)'),
- onSort: (int columnIndex, bool ascending) => _sort<String>((Dessert d) => d.name, columnIndex, ascending)
+ onSort: (int columnIndex, bool ascending) => _sort<String>((Dessert d) => d.name, columnIndex, ascending),
),
DataColumn(
label: const Text('Calories'),
tooltip: 'The total amount of food energy in the given serving size.',
numeric: true,
- onSort: (int columnIndex, bool ascending) => _sort<num>((Dessert d) => d.calories, columnIndex, ascending)
+ onSort: (int columnIndex, bool ascending) => _sort<num>((Dessert d) => d.calories, columnIndex, ascending),
),
DataColumn(
label: const Text('Fat (g)'),
numeric: true,
- onSort: (int columnIndex, bool ascending) => _sort<num>((Dessert d) => d.fat, columnIndex, ascending)
+ onSort: (int columnIndex, bool ascending) => _sort<num>((Dessert d) => d.fat, columnIndex, ascending),
),
DataColumn(
label: const Text('Carbs (g)'),
numeric: true,
- onSort: (int columnIndex, bool ascending) => _sort<num>((Dessert d) => d.carbs, columnIndex, ascending)
+ onSort: (int columnIndex, bool ascending) => _sort<num>((Dessert d) => d.carbs, columnIndex, ascending),
),
DataColumn(
label: const Text('Protein (g)'),
numeric: true,
- onSort: (int columnIndex, bool ascending) => _sort<num>((Dessert d) => d.protein, columnIndex, ascending)
+ onSort: (int columnIndex, bool ascending) => _sort<num>((Dessert d) => d.protein, columnIndex, ascending),
),
DataColumn(
label: const Text('Sodium (mg)'),
numeric: true,
- onSort: (int columnIndex, bool ascending) => _sort<num>((Dessert d) => d.sodium, columnIndex, ascending)
+ onSort: (int columnIndex, bool ascending) => _sort<num>((Dessert d) => d.sodium, columnIndex, ascending),
),
DataColumn(
label: const Text('Calcium (%)'),
tooltip: 'The amount of calcium as a percentage of the recommended daily amount.',
numeric: true,
- onSort: (int columnIndex, bool ascending) => _sort<num>((Dessert d) => d.calcium, columnIndex, ascending)
+ onSort: (int columnIndex, bool ascending) => _sort<num>((Dessert d) => d.calcium, columnIndex, ascending),
),
DataColumn(
label: const Text('Iron (%)'),
numeric: true,
- onSort: (int columnIndex, bool ascending) => _sort<num>((Dessert d) => d.iron, columnIndex, ascending)
+ onSort: (int columnIndex, bool ascending) => _sort<num>((Dessert d) => d.iron, columnIndex, ascending),
),
],
- source: _dessertsDataSource
- )
- ]
- )
+ source: _dessertsDataSource,
+ ),
+ ],
+ ),
);
}
}
diff --git a/examples/flutter_gallery/lib/demo/material/date_and_time_picker_demo.dart b/examples/flutter_gallery/lib/demo/material/date_and_time_picker_demo.dart
index ab9763e..e2b4651 100644
--- a/examples/flutter_gallery/lib/demo/material/date_and_time_picker_demo.dart
+++ b/examples/flutter_gallery/lib/demo/material/date_and_time_picker_demo.dart
@@ -39,7 +39,7 @@
children: <Widget>[
Text(valueText, style: valueStyle),
Icon(Icons.arrow_drop_down,
- color: Theme.of(context).brightness == Brightness.light ? Colors.grey.shade700 : Colors.white70
+ color: Theme.of(context).brightness == Brightness.light ? Colors.grey.shade700 : Colors.white70,
),
],
),
@@ -55,7 +55,7 @@
this.selectedDate,
this.selectedTime,
this.selectDate,
- this.selectTime
+ this.selectTime,
}) : super(key: key);
final String labelText;
@@ -69,7 +69,7 @@
context: context,
initialDate: selectedDate,
firstDate: DateTime(2015, 8),
- lastDate: DateTime(2101)
+ lastDate: DateTime(2101),
);
if (picked != null && picked != selectedDate)
selectDate(picked);
@@ -78,7 +78,7 @@
Future<void> _selectTime(BuildContext context) async {
final TimeOfDay picked = await showTimePicker(
context: context,
- initialTime: selectedTime
+ initialTime: selectedTime,
);
if (picked != null && picked != selectedTime)
selectTime(picked);
diff --git a/examples/flutter_gallery/lib/demo/material/dialog_demo.dart b/examples/flutter_gallery/lib/demo/material/dialog_demo.dart
index 73c5e83..6f4116e 100644
--- a/examples/flutter_gallery/lib/demo/material/dialog_demo.dart
+++ b/examples/flutter_gallery/lib/demo/material/dialog_demo.dart
@@ -74,7 +74,7 @@
.then<void>((T value) { // The value passed to Navigator.pop() or null.
if (value != null) {
_scaffoldKey.currentState.showSnackBar(SnackBar(
- content: Text('You selected: $value')
+ content: Text('You selected: $value'),
));
}
});
@@ -102,21 +102,21 @@
child: AlertDialog(
content: Text(
_alertWithoutTitleText,
- style: dialogTextStyle
+ style: dialogTextStyle,
),
actions: <Widget>[
FlatButton(
child: const Text('CANCEL'),
- onPressed: () { Navigator.pop(context, DialogDemoAction.cancel); }
+ onPressed: () { Navigator.pop(context, DialogDemoAction.cancel); },
),
FlatButton(
child: const Text('DISCARD'),
- onPressed: () { Navigator.pop(context, DialogDemoAction.discard); }
- )
- ]
- )
+ onPressed: () { Navigator.pop(context, DialogDemoAction.discard); },
+ ),
+ ],
+ ),
);
- }
+ },
),
RaisedButton(
child: const Text('ALERT WITH TITLE'),
@@ -127,21 +127,21 @@
title: const Text('Use Google\'s location service?'),
content: Text(
_alertWithTitleText,
- style: dialogTextStyle
+ style: dialogTextStyle,
),
actions: <Widget>[
FlatButton(
child: const Text('DISAGREE'),
- onPressed: () { Navigator.pop(context, DialogDemoAction.disagree); }
+ onPressed: () { Navigator.pop(context, DialogDemoAction.disagree); },
),
FlatButton(
child: const Text('AGREE'),
- onPressed: () { Navigator.pop(context, DialogDemoAction.agree); }
- )
- ]
- )
+ onPressed: () { Navigator.pop(context, DialogDemoAction.agree); },
+ ),
+ ],
+ ),
);
- }
+ },
),
RaisedButton(
child: const Text('SIMPLE'),
@@ -155,40 +155,40 @@
icon: Icons.account_circle,
color: theme.primaryColor,
text: 'username@gmail.com',
- onPressed: () { Navigator.pop(context, 'username@gmail.com'); }
+ onPressed: () { Navigator.pop(context, 'username@gmail.com'); },
),
DialogDemoItem(
icon: Icons.account_circle,
color: theme.primaryColor,
text: 'user02@gmail.com',
- onPressed: () { Navigator.pop(context, 'user02@gmail.com'); }
+ onPressed: () { Navigator.pop(context, 'user02@gmail.com'); },
),
DialogDemoItem(
icon: Icons.add_circle,
text: 'add account',
- color: theme.disabledColor
- )
- ]
- )
+ color: theme.disabledColor,
+ ),
+ ],
+ ),
);
- }
+ },
),
RaisedButton(
child: const Text('CONFIRMATION'),
onPressed: () {
showTimePicker(
context: context,
- initialTime: _selectedTime
+ initialTime: _selectedTime,
)
.then<void>((TimeOfDay value) {
if (value != null && value != _selectedTime) {
_selectedTime = value;
_scaffoldKey.currentState.showSnackBar(SnackBar(
- content: Text('You selected: ${value.format(context)}')
+ content: Text('You selected: ${value.format(context)}'),
));
}
});
- }
+ },
),
RaisedButton(
child: const Text('FULLSCREEN'),
@@ -197,18 +197,18 @@
builder: (BuildContext context) => FullScreenDialogDemo(),
fullscreenDialog: true,
));
- }
+ },
),
]
// Add a little space between the buttons
.map<Widget>((Widget button) {
return Container(
padding: const EdgeInsets.symmetric(vertical: 8.0),
- child: button
+ child: button,
);
})
- .toList()
- )
+ .toList(),
+ ),
);
}
}
diff --git a/examples/flutter_gallery/lib/demo/material/drawer_demo.dart b/examples/flutter_gallery/lib/demo/material/drawer_demo.dart
index a978199..417b8c9 100644
--- a/examples/flutter_gallery/lib/demo/material/drawer_demo.dart
+++ b/examples/flutter_gallery/lib/demo/material/drawer_demo.dart
@@ -73,7 +73,7 @@
void _showNotImplementedMessage() {
Navigator.pop(context); // Dismiss the drawer.
_scaffoldKey.currentState.showSnackBar(const SnackBar(
- content: Text("The drawer's items don't do anything")
+ content: Text("The drawer's items don't do anything"),
));
}
diff --git a/examples/flutter_gallery/lib/demo/material/elevation_demo.dart b/examples/flutter_gallery/lib/demo/material/elevation_demo.dart
index c2500a4..f889808 100644
--- a/examples/flutter_gallery/lib/demo/material/elevation_demo.dart
+++ b/examples/flutter_gallery/lib/demo/material/elevation_demo.dart
@@ -54,7 +54,7 @@
onPressed: () {
setState(() => _showElevation = !_showElevation);
},
- )
+ ),
],
),
body: ListView(
diff --git a/examples/flutter_gallery/lib/demo/material/expansion_panels_demo.dart b/examples/flutter_gallery/lib/demo/material/expansion_panels_demo.dart
index 1eb7b62..fb84c4f 100644
--- a/examples/flutter_gallery/lib/demo/material/expansion_panels_demo.dart
+++ b/examples/flutter_gallery/lib/demo/material/expansion_panels_demo.dart
@@ -21,7 +21,7 @@
this.name,
this.value,
this.hint,
- this.showHint
+ this.showHint,
});
final String name;
@@ -69,11 +69,11 @@
child: _crossFade(
Text(value, style: textTheme.caption.copyWith(fontSize: 15.0)),
Text(hint, style: textTheme.caption.copyWith(fontSize: 15.0)),
- showHint
- )
- )
- )
- ]
+ showHint,
+ ),
+ ),
+ ),
+ ],
);
}
}
@@ -83,7 +83,7 @@
this.margin = EdgeInsets.zero,
this.child,
this.onSave,
- this.onCancel
+ this.onCancel,
});
final EdgeInsets margin;
@@ -102,14 +102,14 @@
margin: const EdgeInsets.only(
left: 24.0,
right: 24.0,
- bottom: 24.0
+ bottom: 24.0,
) - margin,
child: Center(
child: DefaultTextStyle(
style: textTheme.caption.copyWith(fontSize: 15.0),
- child: child
- )
- )
+ child: child,
+ ),
+ ),
),
const Divider(height: 1.0),
Container(
@@ -124,22 +124,22 @@
child: const Text('CANCEL', style: TextStyle(
color: Colors.black54,
fontSize: 15.0,
- fontWeight: FontWeight.w500
- ))
- )
+ fontWeight: FontWeight.w500,
+ )),
+ ),
),
Container(
margin: const EdgeInsets.only(right: 8.0),
child: FlatButton(
onPressed: onSave,
textTheme: ButtonTextTheme.accent,
- child: const Text('SAVE')
- )
- )
- ]
- )
- )
- ]
+ child: const Text('SAVE'),
+ ),
+ ),
+ ],
+ ),
+ ),
+ ],
);
}
}
@@ -150,7 +150,7 @@
this.value,
this.hint,
this.builder,
- this.valueToString
+ this.valueToString,
}) : textController = TextEditingController(text: valueToString(value));
final String name;
@@ -167,7 +167,7 @@
name: name,
value: valueToString(value),
hint: hint,
- showHint: isExpanded
+ showHint: isExpanded,
);
};
}
@@ -269,15 +269,15 @@
groupValue: field.value,
onChanged: field.didChange,
),
- ]
+ ],
);
- }
+ },
),
);
}
- )
+ ),
);
- }
+ },
),
DemoItem<double>(
name: 'Sun',
@@ -314,10 +314,10 @@
),
);
}
- )
+ ),
);
- }
- )
+ },
+ ),
];
}
@@ -346,9 +346,9 @@
return ExpansionPanel(
isExpanded: item.isExpanded,
headerBuilder: item.headerBuilder,
- body: item.build()
+ body: item.build(),
);
- }).toList()
+ }).toList(),
),
),
),
diff --git a/examples/flutter_gallery/lib/demo/material/expansion_tile_list_demo.dart b/examples/flutter_gallery/lib/demo/material/expansion_tile_list_demo.dart
index b4338d2..9011e80 100644
--- a/examples/flutter_gallery/lib/demo/material/expansion_tile_list_demo.dart
+++ b/examples/flutter_gallery/lib/demo/material/expansion_tile_list_demo.dart
@@ -27,12 +27,12 @@
ListTile(title: Text('Two')),
// https://en.wikipedia.org/wiki/Free_Four
ListTile(title: Text('Free')),
- ListTile(title: Text('Four'))
- ]
+ ListTile(title: Text('Four')),
+ ],
),
- const ListTile(title: Text('Bottom'))
- ]
- )
+ const ListTile(title: Text('Bottom')),
+ ],
+ ),
);
}
}
diff --git a/examples/flutter_gallery/lib/demo/material/full_screen_dialog_demo.dart b/examples/flutter_gallery/lib/demo/material/full_screen_dialog_demo.dart
index 7d715ae..c29e6ef 100644
--- a/examples/flutter_gallery/lib/demo/material/full_screen_dialog_demo.dart
+++ b/examples/flutter_gallery/lib/demo/material/full_screen_dialog_demo.dart
@@ -47,7 +47,7 @@
context: context,
initialDate: date,
firstDate: date.subtract(const Duration(days: 30)),
- lastDate: date.add(const Duration(days: 30))
+ lastDate: date.add(const Duration(days: 30)),
)
.then<void>((DateTime value) {
if (value != null)
@@ -59,10 +59,10 @@
children: <Widget>[
Text(DateFormat('EEE, MMM d yyyy').format(date)),
const Icon(Icons.arrow_drop_down, color: Colors.black54),
- ]
- )
- )
- )
+ ],
+ ),
+ ),
+ ),
),
Container(
margin: const EdgeInsets.only(left: 8.0),
@@ -74,7 +74,7 @@
onTap: () {
showTimePicker(
context: context,
- initialTime: time
+ initialTime: time,
)
.then<void>((TimeOfDay value) {
if (value != null)
@@ -85,12 +85,12 @@
children: <Widget>[
Text('${time.format(context)}'),
const Icon(Icons.arrow_drop_down, color: Colors.black54),
- ]
- )
- )
- )
- ]
- )
+ ],
+ ),
+ ),
+ ),
+ ],
+ ),
);
}
}
@@ -123,21 +123,21 @@
return AlertDialog(
content: Text(
'Discard new event?',
- style: dialogTextStyle
+ style: dialogTextStyle,
),
actions: <Widget>[
FlatButton(
child: const Text('CANCEL'),
onPressed: () {
Navigator.of(context).pop(false); // Pops the confirmation dialog but not the page.
- }
+ },
),
FlatButton(
child: const Text('DISCARD'),
onPressed: () {
Navigator.of(context).pop(true); // Returning true to _onWillPop will pop again.
- }
- )
+ },
+ ),
],
);
},
@@ -156,9 +156,9 @@
child: Text('SAVE', style: theme.textTheme.body1.copyWith(color: Colors.white)),
onPressed: () {
Navigator.pop(context, DismissDialogAction.save);
- }
- )
- ]
+ },
+ ),
+ ],
),
body: Form(
onWillPop: _onWillPop,
@@ -171,7 +171,7 @@
child: TextField(
decoration: const InputDecoration(
labelText: 'Event name',
- filled: true
+ filled: true,
),
style: theme.textTheme.headline,
onChanged: (String value) {
@@ -181,8 +181,8 @@
_eventName = value;
}
});
- }
- )
+ },
+ ),
),
Container(
padding: const EdgeInsets.symmetric(vertical: 8.0),
@@ -191,14 +191,14 @@
decoration: const InputDecoration(
labelText: 'Location',
hintText: 'Where is the event?',
- filled: true
+ filled: true,
),
onChanged: (String value) {
setState(() {
_hasLocation = value.isNotEmpty;
});
- }
- )
+ },
+ ),
),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
@@ -211,9 +211,9 @@
_fromDateTime = value;
_saveNeeded = true;
});
- }
- )
- ]
+ },
+ ),
+ ],
),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
@@ -226,10 +226,10 @@
_toDateTime = value;
_saveNeeded = true;
});
- }
+ },
),
const Text('All-day'),
- ]
+ ],
),
Container(
decoration: BoxDecoration(
@@ -244,22 +244,22 @@
_allDayValue = value;
_saveNeeded = true;
});
- }
+ },
),
const Text('All-day'),
- ]
- )
- )
+ ],
+ ),
+ ),
]
.map<Widget>((Widget child) {
return Container(
padding: const EdgeInsets.symmetric(vertical: 8.0),
height: 96.0,
- child: child
+ child: child,
);
})
- .toList()
- )
+ .toList(),
+ ),
),
);
}
diff --git a/examples/flutter_gallery/lib/demo/material/grid_list_demo.dart b/examples/flutter_gallery/lib/demo/material/grid_list_demo.dart
index eaa72b3..2267606 100644
--- a/examples/flutter_gallery/lib/demo/material/grid_list_demo.dart
+++ b/examples/flutter_gallery/lib/demo/material/grid_list_demo.dart
@@ -121,7 +121,7 @@
final double distance = (Offset.zero & context.size).shortestSide;
_flingAnimation = _controller.drive(Tween<Offset>(
begin: _offset,
- end: _clampOffset(_offset + direction * distance)
+ end: _clampOffset(_offset + direction * distance),
));
_controller
..value = 0.0
@@ -155,7 +155,7 @@
Key key,
@required this.photo,
@required this.tileStyle,
- @required this.onBannerTap
+ @required this.onBannerTap,
}) : assert(photo != null && photo.isValid),
assert(tileStyle != null),
assert(onBannerTap != null),
@@ -170,7 +170,7 @@
builder: (BuildContext context) {
return Scaffold(
appBar: AppBar(
- title: Text(photo.title)
+ title: Text(photo.title),
),
body: SizedBox.expand(
child: Hero(
@@ -194,8 +194,8 @@
photo.assetName,
package: photo.assetPackage,
fit: BoxFit.cover,
- )
- )
+ ),
+ ),
);
final IconData icon = photo.isFavorite ? Icons.star : Icons.star_border;
@@ -382,7 +382,7 @@
setState(() {
photo.isFavorite = !photo.isFavorite;
});
- }
+ },
);
}).toList(),
),
diff --git a/examples/flutter_gallery/lib/demo/material/icons_demo.dart b/examples/flutter_gallery/lib/demo/material/icons_demo.dart
index ba452ae..21e3f1f 100644
--- a/examples/flutter_gallery/lib/demo/material/icons_demo.dart
+++ b/examples/flutter_gallery/lib/demo/material/icons_demo.dart
@@ -83,7 +83,7 @@
icon: Icon(icon),
iconSize: iconSize,
tooltip: "${enabled ? 'Enabled' : 'Disabled'} icon button",
- onPressed: enabled ? handleIconButtonPress : null
+ onPressed: enabled ? handleIconButtonPress : null,
);
}
diff --git a/examples/flutter_gallery/lib/demo/material/leave_behind_demo.dart b/examples/flutter_gallery/lib/demo/material/leave_behind_demo.dart
index c723baf..cb0dff8 100644
--- a/examples/flutter_gallery/lib/demo/material/leave_behind_demo.dart
+++ b/examples/flutter_gallery/lib/demo/material/leave_behind_demo.dart
@@ -51,7 +51,7 @@
index: index,
name: 'Item $index Sender',
subject: 'Subject: $index',
- body: "[$index] first line of the message's body..."
+ body: "[$index] first line of the message's body...",
);
});
}
@@ -96,8 +96,8 @@
content: Text('You archived item ${item.index}'),
action: SnackBarAction(
label: 'UNDO',
- onPressed: () { handleUndo(item); }
- )
+ onPressed: () { handleUndo(item); },
+ ),
));
}
@@ -109,8 +109,8 @@
content: Text('You deleted item ${item.index}'),
action: SnackBarAction(
label: 'UNDO',
- onPressed: () { handleUndo(item); }
- )
+ onPressed: () { handleUndo(item); },
+ ),
));
}
@@ -133,7 +133,7 @@
onDelete: _handleDelete,
dismissDirection: _dismissDirection,
);
- }).toList()
+ }).toList(),
);
}
@@ -148,27 +148,27 @@
itemBuilder: (BuildContext context) => <PopupMenuEntry<LeaveBehindDemoAction>>[
const PopupMenuItem<LeaveBehindDemoAction>(
value: LeaveBehindDemoAction.reset,
- child: Text('Reset the list')
+ child: Text('Reset the list'),
),
const PopupMenuDivider(),
CheckedPopupMenuItem<LeaveBehindDemoAction>(
value: LeaveBehindDemoAction.horizontalSwipe,
checked: _dismissDirection == DismissDirection.horizontal,
- child: const Text('Horizontal swipe')
+ child: const Text('Horizontal swipe'),
),
CheckedPopupMenuItem<LeaveBehindDemoAction>(
value: LeaveBehindDemoAction.leftSwipe,
checked: _dismissDirection == DismissDirection.endToStart,
- child: const Text('Only swipe left')
+ child: const Text('Only swipe left'),
),
CheckedPopupMenuItem<LeaveBehindDemoAction>(
value: LeaveBehindDemoAction.rightSwipe,
checked: _dismissDirection == DismissDirection.startToEnd,
- child: const Text('Only swipe right')
- )
- ]
- )
- ]
+ child: const Text('Only swipe right'),
+ ),
+ ],
+ ),
+ ],
),
body: body,
);
@@ -217,24 +217,24 @@
background: Container(
color: theme.primaryColor,
child: const ListTile(
- leading: Icon(Icons.delete, color: Colors.white, size: 36.0)
- )
+ leading: Icon(Icons.delete, color: Colors.white, size: 36.0),
+ ),
),
secondaryBackground: Container(
color: theme.primaryColor,
child: const ListTile(
- trailing: Icon(Icons.archive, color: Colors.white, size: 36.0)
- )
+ trailing: Icon(Icons.archive, color: Colors.white, size: 36.0),
+ ),
),
child: Container(
decoration: BoxDecoration(
color: theme.canvasColor,
- border: Border(bottom: BorderSide(color: theme.dividerColor))
+ border: Border(bottom: BorderSide(color: theme.dividerColor)),
),
child: ListTile(
title: Text(item.name),
subtitle: Text('${item.subject}\n${item.body}'),
- isThreeLine: true
+ isThreeLine: true,
),
),
),
diff --git a/examples/flutter_gallery/lib/demo/material/list_demo.dart b/examples/flutter_gallery/lib/demo/material/list_demo.dart
index d47c226..0e90ef6 100644
--- a/examples/flutter_gallery/lib/demo/material/list_demo.dart
+++ b/examples/flutter_gallery/lib/demo/material/list_demo.dart
@@ -68,7 +68,7 @@
value: _showAvatars ? _MaterialListType.oneLineWithAvatar : _MaterialListType.oneLine,
groupValue: _itemType,
onChanged: changeItemType,
- )
+ ),
),
),
MergeSemantics(
@@ -79,7 +79,7 @@
value: _MaterialListType.twoLine,
groupValue: _itemType,
onChanged: changeItemType,
- )
+ ),
),
),
MergeSemantics(
diff --git a/examples/flutter_gallery/lib/demo/material/menu_demo.dart b/examples/flutter_gallery/lib/demo/material/menu_demo.dart
index 20b55da..2434b4d 100644
--- a/examples/flutter_gallery/lib/demo/material/menu_demo.dart
+++ b/examples/flutter_gallery/lib/demo/material/menu_demo.dart
@@ -38,7 +38,7 @@
void showInSnackBar(String value) {
_scaffoldKey.currentState.showSnackBar(SnackBar(
- content: Text(value)
+ content: Text(value),
));
}
@@ -72,15 +72,15 @@
itemBuilder: (BuildContext context) => <PopupMenuItem<String>>[
const PopupMenuItem<String>(
value: 'Toolbar menu',
- child: Text('Toolbar menu')
+ child: Text('Toolbar menu'),
),
const PopupMenuItem<String>(
value: 'Right here',
- child: Text('Right here')
+ child: Text('Right here'),
),
const PopupMenuItem<String>(
value: 'Hooray!',
- child: Text('Hooray!')
+ child: Text('Hooray!'),
),
],
),
@@ -100,18 +100,18 @@
itemBuilder: (BuildContext context) => <PopupMenuItem<String>>[
PopupMenuItem<String>(
value: _simpleValue1,
- child: const Text('Context menu item one')
+ child: const Text('Context menu item one'),
),
const PopupMenuItem<String>(
enabled: false,
- child: Text('A disabled menu item')
+ child: Text('A disabled menu item'),
),
PopupMenuItem<String>(
value: _simpleValue3,
- child: const Text('Context menu item three')
+ child: const Text('Context menu item three'),
),
- ]
- )
+ ],
+ ),
),
// Pressing the PopupMenuButton on the right of this item shows
// a menu whose items have text labels and icons and a divider
@@ -126,33 +126,33 @@
value: 'Preview',
child: ListTile(
leading: Icon(Icons.visibility),
- title: Text('Preview')
- )
+ title: Text('Preview'),
+ ),
),
const PopupMenuItem<String>(
value: 'Share',
child: ListTile(
leading: Icon(Icons.person_add),
- title: Text('Share')
- )
+ title: Text('Share'),
+ ),
),
const PopupMenuItem<String>(
value: 'Get Link',
child: ListTile(
leading: Icon(Icons.link),
- title: Text('Get link')
- )
+ title: Text('Get link'),
+ ),
),
const PopupMenuDivider(),
const PopupMenuItem<String>(
value: 'Remove',
child: ListTile(
leading: Icon(Icons.delete),
- title: Text('Remove')
- )
- )
- ]
- )
+ title: Text('Remove'),
+ ),
+ ),
+ ],
+ ),
),
// This entire list item is a PopupMenuButton. Tapping anywhere shows
// a menu whose current value is highlighted and aligned over the
@@ -163,22 +163,22 @@
onSelected: showMenuSelection,
child: ListTile(
title: const Text('An item with a simple menu'),
- subtitle: Text(_simpleValue)
+ subtitle: Text(_simpleValue),
),
itemBuilder: (BuildContext context) => <PopupMenuItem<String>>[
PopupMenuItem<String>(
value: _simpleValue1,
- child: Text(_simpleValue1)
+ child: Text(_simpleValue1),
),
PopupMenuItem<String>(
value: _simpleValue2,
- child: Text(_simpleValue2)
+ child: Text(_simpleValue2),
),
PopupMenuItem<String>(
value: _simpleValue3,
- child: Text(_simpleValue3)
- )
- ]
+ child: Text(_simpleValue3),
+ ),
+ ],
),
// Pressing the PopupMenuButton on the right of this item shows a menu
// whose items have checked icons that reflect this app's state.
@@ -191,29 +191,29 @@
CheckedPopupMenuItem<String>(
value: _checkedValue1,
checked: isChecked(_checkedValue1),
- child: Text(_checkedValue1)
+ child: Text(_checkedValue1),
),
CheckedPopupMenuItem<String>(
value: _checkedValue2,
enabled: false,
checked: isChecked(_checkedValue2),
- child: Text(_checkedValue2)
+ child: Text(_checkedValue2),
),
CheckedPopupMenuItem<String>(
value: _checkedValue3,
checked: isChecked(_checkedValue3),
- child: Text(_checkedValue3)
+ child: Text(_checkedValue3),
),
CheckedPopupMenuItem<String>(
value: _checkedValue4,
checked: isChecked(_checkedValue4),
- child: Text(_checkedValue4)
- )
- ]
- )
- )
- ]
- )
+ child: Text(_checkedValue4),
+ ),
+ ],
+ ),
+ ),
+ ],
+ ),
);
}
}
diff --git a/examples/flutter_gallery/lib/demo/material/modal_bottom_sheet_demo.dart b/examples/flutter_gallery/lib/demo/material/modal_bottom_sheet_demo.dart
index 127eba5..29a0647 100644
--- a/examples/flutter_gallery/lib/demo/material/modal_bottom_sheet_demo.dart
+++ b/examples/flutter_gallery/lib/demo/material/modal_bottom_sheet_demo.dart
@@ -28,15 +28,15 @@
textAlign: TextAlign.center,
style: TextStyle(
color: Theme.of(context).accentColor,
- fontSize: 24.0
- )
- )
- )
+ fontSize: 24.0,
+ ),
+ ),
+ ),
);
});
- }
- )
- )
+ },
+ ),
+ ),
);
}
}
diff --git a/examples/flutter_gallery/lib/demo/material/overscroll_demo.dart b/examples/flutter_gallery/lib/demo/material/overscroll_demo.dart
index 028b1fc..8450a50 100644
--- a/examples/flutter_gallery/lib/demo/material/overscroll_demo.dart
+++ b/examples/flutter_gallery/lib/demo/material/overscroll_demo.dart
@@ -23,7 +23,7 @@
final GlobalKey<ScaffoldState> _scaffoldKey = GlobalKey<ScaffoldState>();
final GlobalKey<RefreshIndicatorState> _refreshIndicatorKey = GlobalKey<RefreshIndicatorState>();
static final List<String> _items = <String>[
- 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N'
+ 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N',
];
Future<void> _handleRefresh() {
@@ -36,8 +36,8 @@
label: 'RETRY',
onPressed: () {
_refreshIndicatorKey.currentState.show();
- }
- )
+ },
+ ),
));
});
}
@@ -55,9 +55,9 @@
tooltip: 'Refresh',
onPressed: () {
_refreshIndicatorKey.currentState.show();
- }
+ },
),
- ]
+ ],
),
body: RefreshIndicator(
key: _refreshIndicatorKey,
diff --git a/examples/flutter_gallery/lib/demo/material/page_selector_demo.dart b/examples/flutter_gallery/lib/demo/material/page_selector_demo.dart
index 4a7dfe5..f18d1d9 100644
--- a/examples/flutter_gallery/lib/demo/material/page_selector_demo.dart
+++ b/examples/flutter_gallery/lib/demo/material/page_selector_demo.dart
@@ -34,18 +34,18 @@
icon: const Icon(Icons.chevron_left),
color: color,
onPressed: () { _handleArrowButtonPress(context, -1); },
- tooltip: 'Page back'
+ tooltip: 'Page back',
),
TabPageSelector(controller: controller),
IconButton(
icon: const Icon(Icons.chevron_right),
color: color,
onPressed: () { _handleArrowButtonPress(context, 1); },
- tooltip: 'Page forward'
- )
+ tooltip: 'Page forward',
+ ),
],
- mainAxisAlignment: MainAxisAlignment.spaceBetween
- )
+ mainAxisAlignment: MainAxisAlignment.spaceBetween,
+ ),
),
Expanded(
child: IconTheme(
@@ -63,7 +63,7 @@
),
),
);
- }).toList()
+ }).toList(),
),
),
),
diff --git a/examples/flutter_gallery/lib/demo/material/persistent_bottom_sheet_demo.dart b/examples/flutter_gallery/lib/demo/material/persistent_bottom_sheet_demo.dart
index 40ac589..7771c9d 100644
--- a/examples/flutter_gallery/lib/demo/material/persistent_bottom_sheet_demo.dart
+++ b/examples/flutter_gallery/lib/demo/material/persistent_bottom_sheet_demo.dart
@@ -40,10 +40,10 @@
textAlign: TextAlign.center,
style: TextStyle(
color: themeData.accentColor,
- fontSize: 24.0
- )
- )
- )
+ fontSize: 24.0,
+ ),
+ ),
+ ),
);
})
.closed.whenComplete(() {
@@ -66,8 +66,8 @@
onPressed: () {
Navigator.pop(context);
},
- child: const Text('OK')
- )
+ child: const Text('OK'),
+ ),
],
);
},
@@ -95,9 +95,9 @@
body: Center(
child: RaisedButton(
onPressed: _showBottomSheetCallback,
- child: const Text('SHOW BOTTOM SHEET')
- )
- )
+ child: const Text('SHOW BOTTOM SHEET'),
+ ),
+ ),
);
}
}
diff --git a/examples/flutter_gallery/lib/demo/material/progress_indicator_demo.dart b/examples/flutter_gallery/lib/demo/material/progress_indicator_demo.dart
index edfa549..ae80842 100644
--- a/examples/flutter_gallery/lib/demo/material/progress_indicator_demo.dart
+++ b/examples/flutter_gallery/lib/demo/material/progress_indicator_demo.dart
@@ -29,7 +29,7 @@
_animation = CurvedAnimation(
parent: _controller,
curve: const Interval(0.0, 0.9, curve: Curves.fastOutSlowIn),
- reverseCurve: Curves.fastOutSlowIn
+ reverseCurve: Curves.fastOutSlowIn,
)..addStatusListener((AnimationStatus status) {
if (status == AnimationStatus.dismissed)
_controller.forward();
@@ -68,7 +68,7 @@
final List<Widget> indicators = <Widget>[
const SizedBox(
width: 200.0,
- child: LinearProgressIndicator()
+ child: LinearProgressIndicator(),
),
const LinearProgressIndicator(),
const LinearProgressIndicator(),
@@ -80,13 +80,13 @@
SizedBox(
width: 20.0,
height: 20.0,
- child: CircularProgressIndicator(value: _animation.value)
+ child: CircularProgressIndicator(value: _animation.value),
),
SizedBox(
width: 100.0,
height: 20.0,
child: Text('${(_animation.value * 100.0).toStringAsFixed(1)}%',
- textAlign: TextAlign.right
+ textAlign: TextAlign.right,
),
),
],
@@ -120,7 +120,7 @@
padding: const EdgeInsets.symmetric(vertical: 12.0, horizontal: 8.0),
child: AnimatedBuilder(
animation: _animation,
- builder: _buildIndicators
+ builder: _buildIndicators,
),
),
),
diff --git a/examples/flutter_gallery/lib/demo/material/scrollable_tabs_demo.dart b/examples/flutter_gallery/lib/demo/material/scrollable_tabs_demo.dart
index 0135c30..7e32cb1 100644
--- a/examples/flutter_gallery/lib/demo/material/scrollable_tabs_demo.dart
+++ b/examples/flutter_gallery/lib/demo/material/scrollable_tabs_demo.dart
@@ -141,15 +141,15 @@
itemBuilder: (BuildContext context) => <PopupMenuItem<TabsDemoStyle>>[
const PopupMenuItem<TabsDemoStyle>(
value: TabsDemoStyle.iconsAndText,
- child: Text('Icons and text')
+ child: Text('Icons and text'),
),
const PopupMenuItem<TabsDemoStyle>(
value: TabsDemoStyle.iconsOnly,
- child: Text('Icons only')
+ child: Text('Icons only'),
),
const PopupMenuItem<TabsDemoStyle>(
value: TabsDemoStyle.textOnly,
- child: Text('Text only')
+ child: Text('Text only'),
),
],
),
@@ -193,7 +193,7 @@
),
),
);
- }).toList()
+ }).toList(),
),
);
}
diff --git a/examples/flutter_gallery/lib/demo/material/search_demo.dart b/examples/flutter_gallery/lib/demo/material/search_demo.dart
index e1be3ea..5987a25 100644
--- a/examples/flutter_gallery/lib/demo/material/search_demo.dart
+++ b/examples/flutter_gallery/lib/demo/material/search_demo.dart
@@ -91,7 +91,7 @@
),
),
const SizedBox(height: 64.0),
- Text('Last selected integer: ${_lastIntegerSelected ?? 'NONE' }.')
+ Text('Last selected integer: ${_lastIntegerSelected ?? 'NONE' }.'),
],
),
),
@@ -219,7 +219,7 @@
query = '';
showSuggestions(context);
},
- )
+ ),
];
}
}
diff --git a/examples/flutter_gallery/lib/demo/material/selection_controls_demo.dart b/examples/flutter_gallery/lib/demo/material/selection_controls_demo.dart
index c115ec0..531ca29 100644
--- a/examples/flutter_gallery/lib/demo/material/selection_controls_demo.dart
+++ b/examples/flutter_gallery/lib/demo/material/selection_controls_demo.dart
@@ -58,12 +58,12 @@
demoWidget: buildSwitch(),
exampleCodeTag: _switchCode,
documentationUrl: 'https://docs.flutter.io/flutter/material/Switch-class.html',
- )
+ ),
];
return TabbedComponentDemoScaffold(
title: 'Selection controls',
- demos: demos
+ demos: demos,
);
}
@@ -122,10 +122,10 @@
Checkbox(value: true, onChanged: null),
Checkbox(value: false, onChanged: null),
Checkbox(value: null, tristate: true, onChanged: null),
- ]
- )
- ]
- )
+ ],
+ ),
+ ],
+ ),
);
}
@@ -141,19 +141,19 @@
Radio<int>(
value: 0,
groupValue: radioValue,
- onChanged: handleRadioValueChanged
+ onChanged: handleRadioValueChanged,
),
Radio<int>(
value: 1,
groupValue: radioValue,
- onChanged: handleRadioValueChanged
+ onChanged: handleRadioValueChanged,
),
Radio<int>(
value: 2,
groupValue: radioValue,
- onChanged: handleRadioValueChanged
- )
- ]
+ onChanged: handleRadioValueChanged,
+ ),
+ ],
),
// Disabled radio buttons
Row(
@@ -162,22 +162,22 @@
Radio<int>(
value: 0,
groupValue: 0,
- onChanged: null
+ onChanged: null,
),
Radio<int>(
value: 1,
groupValue: 0,
- onChanged: null
+ onChanged: null,
),
Radio<int>(
value: 2,
groupValue: 0,
- onChanged: null
- )
- ]
- )
- ]
- )
+ onChanged: null,
+ ),
+ ],
+ ),
+ ],
+ ),
);
}
@@ -193,7 +193,7 @@
setState(() {
switchValue = value;
});
- }
+ },
),
// Disabled switches
const Switch.adaptive(value: true, onChanged: null),
diff --git a/examples/flutter_gallery/lib/demo/material/snack_bar_demo.dart b/examples/flutter_gallery/lib/demo/material/snack_bar_demo.dart
index 6f135bf..5dbe976 100644
--- a/examples/flutter_gallery/lib/demo/material/snack_bar_demo.dart
+++ b/examples/flutter_gallery/lib/demo/material/snack_bar_demo.dart
@@ -50,12 +50,12 @@
label: 'ACTION',
onPressed: () {
Scaffold.of(context).showSnackBar(SnackBar(
- content: Text('You pressed snackbar $thisSnackBarIndex\'s action.')
+ content: Text('You pressed snackbar $thisSnackBarIndex\'s action.'),
));
- }
+ },
),
));
- }
+ },
),
),
const Text(_text3),
@@ -63,10 +63,10 @@
.map<Widget>((Widget child) {
return Container(
margin: const EdgeInsets.symmetric(vertical: 12.0),
- child: child
+ child: child,
);
})
- .toList()
+ .toList(),
),
);
}
@@ -82,7 +82,7 @@
// Create an inner BuildContext so that the snackBar onPressed methods
// can refer to the Scaffold with Scaffold.of().
builder: buildBody
- )
+ ),
);
}
}
diff --git a/examples/flutter_gallery/lib/demo/material/tabs_fab_demo.dart b/examples/flutter_gallery/lib/demo/material/tabs_fab_demo.dart
index b24daf7..51a2e2f 100644
--- a/examples/flutter_gallery/lib/demo/material/tabs_fab_demo.dart
+++ b/examples/flutter_gallery/lib/demo/material/tabs_fab_demo.dart
@@ -76,8 +76,8 @@
),
child: Padding(
padding: const EdgeInsets.all(32.0),
- child: Text(_explanatoryText, style: Theme.of(context).textTheme.subhead)
- )
+ child: Text(_explanatoryText, style: Theme.of(context).textTheme.subhead),
+ ),
);
});
}
@@ -93,12 +93,12 @@
child: Text(page.label,
style: TextStyle(
color: page.labelColor,
- fontSize: 32.0
+ fontSize: 32.0,
),
- textAlign: TextAlign.center
- )
- )
- )
+ textAlign: TextAlign.center,
+ ),
+ ),
+ ),
);
}
);
@@ -115,7 +115,7 @@
backgroundColor: page.fabColor,
icon: page.fabIcon,
label: Text(page.label.toUpperCase()),
- onPressed: _showExplanatoryText
+ onPressed: _showExplanatoryText,
);
}
@@ -124,7 +124,7 @@
tooltip: 'Show explanation',
backgroundColor: page.fabColor,
child: page.fabIcon,
- onPressed: _showExplanatoryText
+ onPressed: _showExplanatoryText,
);
}
@@ -153,7 +153,7 @@
floatingActionButton: buildFloatingActionButton(_selectedPage),
body: TabBarView(
controller: _controller,
- children: _allPages.map<Widget>(buildTabView).toList()
+ children: _allPages.map<Widget>(buildTabView).toList(),
),
);
}
diff --git a/examples/flutter_gallery/lib/demo/material/text_form_field_demo.dart b/examples/flutter_gallery/lib/demo/material/text_form_field_demo.dart
index 4deab75..2ffe124 100644
--- a/examples/flutter_gallery/lib/demo/material/text_form_field_demo.dart
+++ b/examples/flutter_gallery/lib/demo/material/text_form_field_demo.dart
@@ -91,7 +91,7 @@
void showInSnackBar(String value) {
_scaffoldKey.currentState.showSnackBar(SnackBar(
- content: Text(value)
+ content: Text(value),
));
}
@@ -251,7 +251,7 @@
labelText: 'Salary',
prefixText: '\$',
suffixText: 'USD',
- suffixStyle: TextStyle(color: Colors.green)
+ suffixStyle: TextStyle(color: Colors.green),
),
maxLines: 1,
),
@@ -288,7 +288,7 @@
const SizedBox(height: 24.0),
Text(
'* indicates required field',
- style: Theme.of(context).textTheme.caption
+ style: Theme.of(context).textTheme.caption,
),
const SizedBox(height: 24.0),
],
@@ -305,7 +305,7 @@
@override
TextEditingValue formatEditUpdate(
TextEditingValue oldValue,
- TextEditingValue newValue
+ TextEditingValue newValue,
) {
final int newTextLength = newValue.text.length;
int selectionIndex = newValue.selection.end;
diff --git a/examples/flutter_gallery/lib/demo/material/tooltip_demo.dart b/examples/flutter_gallery/lib/demo/material/tooltip_demo.dart
index 20707a3..40974a1 100644
--- a/examples/flutter_gallery/lib/demo/material/tooltip_demo.dart
+++ b/examples/flutter_gallery/lib/demo/material/tooltip_demo.dart
@@ -39,11 +39,11 @@
child: Icon(
Icons.call,
size: 18.0,
- color: theme.iconTheme.color
- )
+ color: theme.iconTheme.color,
+ ),
),
- Text(' icon.', style: theme.textTheme.subhead)
- ]
+ Text(' icon.', style: theme.textTheme.subhead),
+ ],
),
Center(
child: IconButton(
@@ -53,23 +53,23 @@
tooltip: 'Place a phone call',
onPressed: () {
Scaffold.of(context).showSnackBar(const SnackBar(
- content: Text('That was an ordinary tap.')
+ content: Text('That was an ordinary tap.'),
));
- }
- )
- )
+ },
+ ),
+ ),
]
.map<Widget>((Widget widget) {
return Padding(
padding: const EdgeInsets.only(top: 16.0, left: 16.0, right: 16.0),
- child: widget
+ child: widget,
);
})
- .toList()
+ .toList(),
),
);
}
- )
+ ),
);
}
}
diff --git a/examples/flutter_gallery/lib/demo/pesto_demo.dart b/examples/flutter_gallery/lib/demo/pesto_demo.dart
index 0f2e4f1..c6e0e74 100644
--- a/examples/flutter_gallery/lib/demo/pesto_demo.dart
+++ b/examples/flutter_gallery/lib/demo/pesto_demo.dart
@@ -129,7 +129,7 @@
bottom: extraPadding,
),
child: Center(
- child: PestoLogo(height: logoHeight, t: t.clamp(0.0, 1.0))
+ child: PestoLogo(height: logoHeight, t: t.clamp(0.0, 1.0)),
),
);
},
@@ -143,7 +143,7 @@
top: 8.0,
left: 8.0 + mediaPadding.left,
right: 8.0 + mediaPadding.right,
- bottom: 8.0
+ bottom: 8.0,
);
return SliverPadding(
padding: padding,
@@ -206,7 +206,7 @@
final TextStyle titleStyle = const PestoStyle(fontSize: kTextHeight, fontWeight: FontWeight.w900, color: Colors.white, letterSpacing: 3.0);
final RectTween _textRectTween = RectTween(
begin: Rect.fromLTWH(0.0, kLogoHeight, kLogoWidth, kTextHeight),
- end: Rect.fromLTWH(0.0, kImageHeight, kLogoWidth, kTextHeight)
+ end: Rect.fromLTWH(0.0, kImageHeight, kLogoWidth, kTextHeight),
);
final Curve _textOpacity = const Interval(0.4, 1.0, curve: Curves.easeInOut);
final RectTween _imageRectTween = RectTween(
@@ -398,7 +398,7 @@
),
),
],
- )
+ ),
),
],
),
@@ -413,7 +413,7 @@
children: <Widget>[
Padding(
padding: const EdgeInsets.only(right: 24.0),
- child: Icon(icon, color: Colors.black54)
+ child: Icon(icon, color: Colors.black54),
),
Text(label, style: menuItemStyle),
],
@@ -453,7 +453,7 @@
padding: const EdgeInsets.symmetric(horizontal: 16.0, vertical: 40.0),
child: Table(
columnWidths: const <int, TableColumnWidth>{
- 0: FixedColumnWidth(64.0)
+ 0: FixedColumnWidth(64.0),
},
children: <TableRow>[
TableRow(
@@ -466,12 +466,12 @@
width: 32.0,
height: 32.0,
alignment: Alignment.centerLeft,
- fit: BoxFit.scaleDown
- )
+ fit: BoxFit.scaleDown,
+ ),
),
TableCell(
verticalAlignment: TableCellVerticalAlignment.middle,
- child: Text(recipe.name, style: titleStyle)
+ child: Text(recipe.name, style: titleStyle),
),
]
),
@@ -480,7 +480,7 @@
const SizedBox(),
Padding(
padding: const EdgeInsets.only(top: 8.0, bottom: 4.0),
- child: Text(recipe.description, style: descriptionStyle)
+ child: Text(recipe.description, style: descriptionStyle),
),
]
),
@@ -489,7 +489,7 @@
const SizedBox(),
Padding(
padding: const EdgeInsets.only(top: 24.0, bottom: 4.0),
- child: Text('Ingredients', style: headingStyle)
+ child: Text('Ingredients', style: headingStyle),
),
]
),
@@ -503,7 +503,7 @@
const SizedBox(),
Padding(
padding: const EdgeInsets.only(top: 24.0, bottom: 4.0),
- child: Text('Steps', style: headingStyle)
+ child: Text('Steps', style: headingStyle),
),
]
)
@@ -544,7 +544,7 @@
this.ingredientsImagePath,
this.ingredientsImagePackage,
this.ingredients,
- this.steps
+ this.steps,
});
final String name;
@@ -689,7 +689,7 @@
steps: <RecipeStep>[
RecipeStep(duration: '10 min', description: 'Prep vegetables'),
RecipeStep(duration: '5 min', description: 'Stir'),
- RecipeStep(duration: '1 hr 10 min', description: 'Cook')
+ RecipeStep(duration: '1 hr 10 min', description: 'Cook'),
],
),
Recipe(
@@ -712,7 +712,7 @@
RecipeStep(duration: '5 min', description: 'Sauté vegetables'),
RecipeStep(duration: '3 min', description: 'Stir vegetables and other filling ingredients'),
RecipeStep(duration: '10 min', description: 'Fill phyllo squares half-full with filling and fold.'),
- RecipeStep(duration: '40 min', description: 'Bake')
+ RecipeStep(duration: '40 min', description: 'Bake'),
],
),
];
diff --git a/examples/flutter_gallery/lib/demo/shrine/backdrop.dart b/examples/flutter_gallery/lib/demo/shrine/backdrop.dart
index 2e79fae..69071be 100644
--- a/examples/flutter_gallery/lib/demo/shrine/backdrop.dart
+++ b/examples/flutter_gallery/lib/demo/shrine/backdrop.dart
@@ -103,7 +103,7 @@
end: const Offset(1.0, 0.0),
).evaluate(animation),
child: const ImageIcon(AssetImage('packages/shrine_images/diamond.png')),
- )
+ ),
]),
),
),
@@ -138,7 +138,7 @@
),
),
],
- )
+ ),
]),
);
}
diff --git a/examples/flutter_gallery/lib/demo/shrine/expanding_bottom_sheet.dart b/examples/flutter_gallery/lib/demo/shrine/expanding_bottom_sheet.dart
index b74d632..3290a22 100644
--- a/examples/flutter_gallery/lib/demo/shrine/expanding_bottom_sheet.dart
+++ b/examples/flutter_gallery/lib/demo/shrine/expanding_bottom_sheet.dart
@@ -609,7 +609,7 @@
_ListModel({
@required this.listKey,
@required this.removedItemBuilder,
- Iterable<int> initialItems
+ Iterable<int> initialItems,
}) : assert(listKey != null),
assert(removedItemBuilder != null),
_items = List<int>.from(initialItems ?? <int>[]);
diff --git a/examples/flutter_gallery/lib/demo/shrine/home.dart b/examples/flutter_gallery/lib/demo/shrine/home.dart
index 33131e2..f213480 100644
--- a/examples/flutter_gallery/lib/demo/shrine/home.dart
+++ b/examples/flutter_gallery/lib/demo/shrine/home.dart
@@ -50,7 +50,7 @@
return Stack(
children: <Widget>[
backdrop,
- Align(child: expandingBottomSheet, alignment: Alignment.bottomRight)
+ Align(child: expandingBottomSheet, alignment: Alignment.bottomRight),
],
);
}
diff --git a/examples/flutter_gallery/lib/demo/shrine/login.dart b/examples/flutter_gallery/lib/demo/shrine/login.dart
index b625908..b249f70 100644
--- a/examples/flutter_gallery/lib/demo/shrine/login.dart
+++ b/examples/flutter_gallery/lib/demo/shrine/login.dart
@@ -40,7 +40,7 @@
// home screen using onGenerateRoute and so rootNavigator must be
// set to true in order to get out of Shrine completely.
Navigator.of(context, rootNavigator: true).pop();
- }
+ },
),
),
body: SafeArea(
diff --git a/examples/flutter_gallery/lib/demo/typography_demo.dart b/examples/flutter_gallery/lib/demo/typography_demo.dart
index a1e0314..5f9c58b 100644
--- a/examples/flutter_gallery/lib/demo/typography_demo.dart
+++ b/examples/flutter_gallery/lib/demo/typography_demo.dart
@@ -30,13 +30,13 @@
children: <Widget>[
SizedBox(
width: 72.0,
- child: Text(name, style: nameStyle)
+ child: Text(name, style: nameStyle),
),
Expanded(
- child: Text(text, style: style.copyWith(height: 1.0))
- )
- ]
- )
+ child: Text(text, style: style.copyWith(height: 1.0)),
+ ),
+ ],
+ ),
);
}
}
@@ -64,7 +64,7 @@
styleItems.insert(0, TextStyleItem(
name: 'Display 4',
style: textTheme.display4,
- text: 'Light 112sp'
+ text: 'Light 112sp',
));
}
diff --git a/examples/flutter_gallery/lib/gallery/about.dart b/examples/flutter_gallery/lib/gallery/about.dart
index d4fcace..2e8b451 100644
--- a/examples/flutter_gallery/lib/gallery/about.dart
+++ b/examples/flutter_gallery/lib/gallery/about.dart
@@ -55,7 +55,7 @@
'${defaultTargetPlatform == TargetPlatform.iOS ? 'multiple platforms' : 'iOS and Android'} '
'from a single codebase. This design lab is a playground '
"and showcase of Flutter's many widgets, behaviors, "
- 'animations, layouts, and more. Learn more about Flutter at '
+ 'animations, layouts, and more. Learn more about Flutter at ',
),
_LinkTextSpan(
style: linkStyle,
diff --git a/examples/flutter_gallery/lib/gallery/backdrop.dart b/examples/flutter_gallery/lib/gallery/backdrop.dart
index 171d5c3..fdfacbd 100644
--- a/examples/flutter_gallery/lib/gallery/backdrop.dart
+++ b/examples/flutter_gallery/lib/gallery/backdrop.dart
@@ -282,7 +282,7 @@
child: widget.backLayer,
visible: _controller.status != AnimationStatus.completed,
maintainState: true,
- )
+ ),
),
],
),
diff --git a/examples/flutter_gallery/lib/gallery/demo.dart b/examples/flutter_gallery/lib/gallery/demo.dart
index 25a13b7..48d4fbf 100644
--- a/examples/flutter_gallery/lib/gallery/demo.dart
+++ b/examples/flutter_gallery/lib/gallery/demo.dart
@@ -91,7 +91,7 @@
onPressed: () => _showExampleCode(context),
);
},
- )
+ ),
],
),
bottom: TabBar(
@@ -109,10 +109,10 @@
Padding(
padding: const EdgeInsets.all(16.0),
child: Text(demo.description,
- style: Theme.of(context).textTheme.subhead
- )
+ style: Theme.of(context).textTheme.subhead,
+ ),
),
- Expanded(child: demo.demoWidget)
+ Expanded(child: demo.demoWidget),
],
),
);
@@ -157,7 +157,7 @@
Widget body;
if (_exampleCode == null) {
body = const Center(
- child: CircularProgressIndicator()
+ child: CircularProgressIndicator(),
);
} else {
body = SingleChildScrollView(
@@ -167,11 +167,11 @@
text: TextSpan(
style: const TextStyle(fontFamily: 'monospace', fontSize: 10.0),
children: <TextSpan>[
- DartSyntaxHighlighter(style).format(_exampleCode)
- ]
- )
- )
- )
+ DartSyntaxHighlighter(style).format(_exampleCode),
+ ],
+ ),
+ ),
+ ),
);
}
@@ -182,11 +182,11 @@
Icons.clear,
semanticLabel: 'Close',
),
- onPressed: () { Navigator.pop(context); }
+ onPressed: () { Navigator.pop(context); },
),
- title: const Text('Example code')
+ title: const Text('Example code'),
),
- body: body
+ body: body,
);
}
}
@@ -207,7 +207,7 @@
return IconButton(
icon: const Icon(Icons.library_books),
tooltip: 'API documentation',
- onPressed: () => launch(documentationUrl, forceWebView: true)
+ onPressed: () => launch(documentationUrl, forceWebView: true),
);
}
}
@@ -231,7 +231,7 @@
label: 'API documentation',
child: const Icon(CupertinoIcons.book),
),
- onPressed: () => launch(documentationUrl, forceWebView: true)
+ onPressed: () => launch(documentationUrl, forceWebView: true),
);
}
}
diff --git a/examples/flutter_gallery/lib/gallery/example_code.dart b/examples/flutter_gallery/lib/gallery/example_code.dart
index 9696939..c20be2e 100644
--- a/examples/flutter_gallery/lib/gallery/example_code.dart
+++ b/examples/flutter_gallery/lib/gallery/example_code.dart
@@ -19,7 +19,7 @@
child: const Text('BUTTON TITLE'),
onPressed: () {
// Perform some action
- }
+ },
);
// Create a disabled button.
@@ -27,7 +27,7 @@
// specified or is null.
const RaisedButton(
child: Text('BUTTON TITLE'),
- onPressed: null
+ onPressed: null,
);
// Create a button with an icon and a
@@ -47,7 +47,7 @@
child: const Text('BUTTON TITLE'),
onPressed: () {
// Perform some action
- }
+ },
);
// Create a disabled button.
@@ -55,7 +55,7 @@
// specified or is null.
const OutlineButton(
child: Text('BUTTON TITLE'),
- onPressed: null
+ onPressed: null,
);
// Create a button with an icon and a
@@ -75,7 +75,7 @@
child: const Text('BUTTON TITLE'),
onPressed: () {
// Perform some action
- }
+ },
);
// Create a disabled button.
@@ -83,7 +83,7 @@
// specified or is null.
const FlatButton(
child: Text('BUTTON TITLE'),
- onPressed: null
+ onPressed: null,
);
// END
@@ -109,7 +109,7 @@
value: value,
child: Text(value));
})
- .toList()
+ .toList(),
);
// END
@@ -124,7 +124,7 @@
onPressed: () {
setState(() => value = !value);
},
- color: value ? Theme.of(context).primaryColor : null
+ color: value ? Theme.of(context).primaryColor : null,
);
// END
@@ -133,12 +133,12 @@
// Floating action button in Scaffold.
Scaffold(
appBar: AppBar(
- title: const Text('Demo')
+ title: const Text('Demo'),
),
floatingActionButton: const FloatingActionButton(
child: Icon(Icons.add),
- onPressed: null
- )
+ onPressed: null,
+ ),
);
// END
}
@@ -199,26 +199,26 @@
Radio<int>(
value: 0,
groupValue: radioValue,
- onChanged: handleRadioValueChanged
+ onChanged: handleRadioValueChanged,
),
Radio<int>(
value: 1,
groupValue: radioValue,
- onChanged: handleRadioValueChanged
+ onChanged: handleRadioValueChanged,
),
Radio<int>(
value: 2,
groupValue: radioValue,
- onChanged: handleRadioValueChanged
- )
- ]
+ onChanged: handleRadioValueChanged,
+ ),
+ ],
);
// Creates a disabled radio button.
const Radio<int>(
value: 0,
groupValue: 0,
- onChanged: null
+ onChanged: null,
);
// END
@@ -262,13 +262,13 @@
'https://example.com/image-1.jpg',
'https://example.com/image-2.jpg',
'...',
- 'https://example.com/image-n.jpg'
+ 'https://example.com/image-n.jpg',
].map<Widget>((String url) {
return GridTile(
footer: GridTileBar(
- title: Text(url)
+ title: Text(url),
),
- child: Image.network(url, fit: BoxFit.cover)
+ child: Image.network(url, fit: BoxFit.cover),
);
}).toList(),
);
diff --git a/examples/flutter_gallery/lib/gallery/home.dart b/examples/flutter_gallery/lib/gallery/home.dart
index 762656d..705e85b 100644
--- a/examples/flutter_gallery/lib/gallery/home.dart
+++ b/examples/flutter_gallery/lib/gallery/home.dart
@@ -400,14 +400,14 @@
child: const Banner(
message: 'PREVIEW',
location: BannerLocation.topEnd,
- )
+ ),
),
- ]
+ ],
);
}
home = AnnotatedRegion<SystemUiOverlayStyle>(
child: home,
- value: SystemUiOverlayStyle.light
+ value: SystemUiOverlayStyle.light,
);
return home;
diff --git a/examples/flutter_gallery/lib/gallery/options.dart b/examples/flutter_gallery/lib/gallery/options.dart
index d40b31a..c9aadb3 100644
--- a/examples/flutter_gallery/lib/gallery/options.dart
+++ b/examples/flutter_gallery/lib/gallery/options.dart
@@ -408,7 +408,7 @@
options.showOffscreenLayersCheckerboard,
(bool value) {
onOptionsChanged(options.copyWith(showOffscreenLayersCheckerboard: value));
- }
+ },
),
);
}
diff --git a/examples/flutter_gallery/lib/gallery/syntax_highlighter.dart b/examples/flutter_gallery/lib/gallery/syntax_highlighter.dart
index 8b9246e..7d4e7d6 100644
--- a/examples/flutter_gallery/lib/gallery/syntax_highlighter.dart
+++ b/examples/flutter_gallery/lib/gallery/syntax_highlighter.dart
@@ -14,7 +14,7 @@
this.stringStyle,
this.punctuationStyle,
this.classStyle,
- this.constantStyle
+ this.constantStyle,
});
static SyntaxHighlighterStyle lightThemeStyle() {
@@ -26,7 +26,7 @@
stringStyle: const TextStyle(color: Color(0xFF43A047)),
punctuationStyle: const TextStyle(color: Color(0xFF000000)),
classStyle: const TextStyle(color: Color(0xFF512DA8)),
- constantStyle: const TextStyle(color: Color(0xFF795548))
+ constantStyle: const TextStyle(color: Color(0xFF795548)),
);
}
@@ -39,7 +39,7 @@
stringStyle: const TextStyle(color: Color(0xFF009688)),
punctuationStyle: const TextStyle(color: Color(0xFFFFFFFF)),
classStyle: const TextStyle(color: Color(0xFF009688)),
- constantStyle: const TextStyle(color: Color(0xFF795548))
+ constantStyle: const TextStyle(color: Color(0xFF795548)),
);
}
@@ -72,11 +72,11 @@
'finally', 'for', 'get', 'if', 'implements', 'import', 'in', 'is', 'library',
'new', 'null', 'operator', 'part', 'rethrow', 'return', 'set', 'static',
'super', 'switch', 'sync', 'this', 'throw', 'true', 'try', 'typedef', 'var',
- 'void', 'while', 'with', 'yield'
+ 'void', 'while', 'with', 'yield',
];
static const List<String> _builtInTypes = <String>[
- 'int', 'double', 'num', 'bool'
+ 'int', 'double', 'num', 'bool',
];
String _src;
@@ -125,7 +125,7 @@
_spans.add(_HighlightSpan(
_HighlightType.comment,
_scanner.lastMatch.start,
- _scanner.lastMatch.end
+ _scanner.lastMatch.end,
));
continue;
}
@@ -146,7 +146,7 @@
_spans.add(_HighlightSpan(
_HighlightType.comment,
startComment,
- endComment
+ endComment,
));
if (eof)
@@ -160,7 +160,7 @@
_spans.add(_HighlightSpan(
_HighlightType.string,
_scanner.lastMatch.start,
- _scanner.lastMatch.end
+ _scanner.lastMatch.end,
));
continue;
}
@@ -170,7 +170,7 @@
_spans.add(_HighlightSpan(
_HighlightType.string,
_scanner.lastMatch.start,
- _scanner.lastMatch.end
+ _scanner.lastMatch.end,
));
continue;
}
@@ -180,7 +180,7 @@
_spans.add(_HighlightSpan(
_HighlightType.string,
_scanner.lastMatch.start,
- _scanner.lastMatch.end
+ _scanner.lastMatch.end,
));
continue;
}
@@ -190,7 +190,7 @@
_spans.add(_HighlightSpan(
_HighlightType.string,
_scanner.lastMatch.start,
- _scanner.lastMatch.end
+ _scanner.lastMatch.end,
));
continue;
}
@@ -200,7 +200,7 @@
_spans.add(_HighlightSpan(
_HighlightType.string,
_scanner.lastMatch.start,
- _scanner.lastMatch.end
+ _scanner.lastMatch.end,
));
continue;
}
@@ -210,7 +210,7 @@
_spans.add(_HighlightSpan(
_HighlightType.string,
_scanner.lastMatch.start,
- _scanner.lastMatch.end
+ _scanner.lastMatch.end,
));
continue;
}
@@ -220,7 +220,7 @@
_spans.add(_HighlightSpan(
_HighlightType.number,
_scanner.lastMatch.start,
- _scanner.lastMatch.end
+ _scanner.lastMatch.end,
));
continue;
}
@@ -240,7 +240,7 @@
_spans.add(_HighlightSpan(
_HighlightType.punctuation,
_scanner.lastMatch.start,
- _scanner.lastMatch.end
+ _scanner.lastMatch.end,
));
continue;
}
@@ -250,7 +250,7 @@
_spans.add(_HighlightSpan(
_HighlightType.keyword,
_scanner.lastMatch.start,
- _scanner.lastMatch.end
+ _scanner.lastMatch.end,
));
continue;
}
@@ -276,7 +276,7 @@
_spans.add(_HighlightSpan(
type,
_scanner.lastMatch.start,
- _scanner.lastMatch.end
+ _scanner.lastMatch.end,
));
}
}
@@ -299,7 +299,7 @@
_spans[i] = _HighlightSpan(
_spans[i].type,
_spans[i].start,
- _spans[i + 1].end
+ _spans[i + 1].end,
);
_spans.removeAt(i + 1);
}
diff --git a/examples/flutter_gallery/test/pesto_test.dart b/examples/flutter_gallery/test/pesto_test.dart
index 86ce9d9..b015034 100644
--- a/examples/flutter_gallery/test/pesto_test.dart
+++ b/examples/flutter_gallery/test/pesto_test.dart
@@ -19,8 +19,8 @@
child: SizedBox(
width: 450.0,
height: 800.0,
- child: GalleryApp(testMode: true)
- )
+ child: GalleryApp(testMode: true),
+ ),
)
);
await tester.pump(); // see https://github.com/flutter/flutter/issues/1865
diff --git a/examples/flutter_gallery/test/update_test.dart b/examples/flutter_gallery/test/update_test.dart
index c7e7568..76448e0 100644
--- a/examples/flutter_gallery/test/update_test.dart
+++ b/examples/flutter_gallery/test/update_test.dart
@@ -20,7 +20,7 @@
await tester.pumpWidget(
const GalleryApp(
testMode: true,
- updateUrlFetcher: mockUpdateUrlFetcher
+ updateUrlFetcher: mockUpdateUrlFetcher,
)
);
await tester.pump(); // see https://github.com/flutter/flutter/issues/1865
diff --git a/examples/flutter_view/lib/main.dart b/examples/flutter_view/lib/main.dart
index 6e03a83..c669113 100644
--- a/examples/flutter_view/lib/main.dart
+++ b/examples/flutter_view/lib/main.dart
@@ -65,7 +65,7 @@
child: Center(
child: Text(
'Platform button tapped $_counter time${ _counter == 1 ? '' : 's' }.',
- style: const TextStyle(fontSize: 17.0))
+ style: const TextStyle(fontSize: 17.0)),
),
),
Container(
diff --git a/examples/layers/raw/hello_world.dart b/examples/layers/raw/hello_world.dart
index 7a9294a..230bc67 100644
--- a/examples/layers/raw/hello_world.dart
+++ b/examples/layers/raw/hello_world.dart
@@ -24,7 +24,7 @@
canvas.scale(devicePixelRatio, devicePixelRatio);
canvas.drawParagraph(paragraph, ui.Offset(
(logicalSize.width - paragraph.maxIntrinsicWidth) / 2.0,
- (logicalSize.height - paragraph.height) / 2.0
+ (logicalSize.height - paragraph.height) / 2.0,
));
final ui.Picture picture = recorder.endRecording();
diff --git a/examples/layers/raw/touch_input.dart b/examples/layers/raw/touch_input.dart
index 52932b1..25984d5 100644
--- a/examples/layers/raw/touch_input.dart
+++ b/examples/layers/raw/touch_input.dart
@@ -28,7 +28,7 @@
canvas.drawCircle(
size.center(ui.Offset.zero),
size.shortestSide * 0.45,
- ui.Paint()..color = color
+ ui.Paint()..color = color,
);
// When we're done issuing painting commands, we end the recording an receive
diff --git a/examples/layers/rendering/hello_world.dart b/examples/layers/rendering/hello_world.dart
index 1f49ca7..f6164d0 100644
--- a/examples/layers/rendering/hello_world.dart
+++ b/examples/layers/rendering/hello_world.dart
@@ -24,6 +24,6 @@
// particular text direction.
textDirection: TextDirection.ltr,
),
- )
+ ),
);
}
diff --git a/examples/layers/rendering/spinning_square.dart b/examples/layers/rendering/spinning_square.dart
index 52f6afb..9d6d1f0 100644
--- a/examples/layers/rendering/spinning_square.dart
+++ b/examples/layers/rendering/spinning_square.dart
@@ -26,7 +26,7 @@
// to have a specific size.
final RenderBox square = RenderConstrainedBox(
additionalConstraints: const BoxConstraints.tightFor(width: 200.0, height: 200.0),
- child: green
+ child: green,
);
// Third, we wrap the sized green square in a render object that applies rotation
// transform before painting its child. Each frame of the animation, we'll
@@ -35,12 +35,12 @@
final RenderTransform spin = RenderTransform(
transform: Matrix4.identity(),
alignment: Alignment.center,
- child: square
+ child: square,
);
// Finally, we center the spinning green square...
final RenderBox root = RenderPositionedBox(
alignment: Alignment.center,
- child: spin
+ child: spin,
);
// and attach it to the window.
RenderingFlutterBinding(root: root);
diff --git a/examples/layers/rendering/src/sector_layout.dart b/examples/layers/rendering/src/sector_layout.dart
index 0cbf123..a9e288e 100644
--- a/examples/layers/rendering/src/sector_layout.dart
+++ b/examples/layers/rendering/src/sector_layout.dart
@@ -14,7 +14,7 @@
this.minDeltaRadius = 0.0,
this.maxDeltaRadius = double.infinity,
this.minDeltaTheta = 0.0,
- this.maxDeltaTheta = kTwoPi
+ this.maxDeltaTheta = kTwoPi,
}) : assert(maxDeltaRadius >= minDeltaRadius),
assert(maxDeltaTheta >= minDeltaTheta);
@@ -46,7 +46,7 @@
@override
bool debugAssertIsValid({
bool isAppliedConstraint = false,
- InformationCollector informationCollector
+ InformationCollector informationCollector,
}) {
assert(isNormalized);
return isNormalized;
@@ -58,11 +58,11 @@
factory SectorDimensions.withConstraints(
SectorConstraints constraints,
- { double deltaRadius = 0.0, double deltaTheta = 0.0 }
+ { double deltaRadius = 0.0, double deltaTheta = 0.0, }
) {
return SectorDimensions(
deltaRadius: constraints.constrainDeltaRadius(deltaRadius),
- deltaTheta: constraints.constrainDeltaTheta(deltaTheta)
+ deltaTheta: constraints.constrainDeltaTheta(deltaTheta),
);
}
@@ -216,7 +216,7 @@
RenderSectorRing({
BoxDecoration decoration,
double deltaRadius = double.infinity,
- double padding = 0.0
+ double padding = 0.0,
}) : _padding = padding,
assert(deltaRadius >= 0.0),
_desiredDeltaRadius = deltaRadius,
@@ -263,7 +263,7 @@
while (child != null) {
final SectorConstraints innerConstraints = SectorConstraints(
maxDeltaRadius: innerDeltaRadius,
- maxDeltaTheta: remainingDeltaTheta
+ maxDeltaTheta: remainingDeltaTheta,
);
final SectorDimensions childDimensions = child.getIntrinsicDimensions(innerConstraints, childRadius);
innerTheta += childDimensions.deltaTheta;
@@ -294,7 +294,7 @@
while (child != null) {
final SectorConstraints innerConstraints = SectorConstraints(
maxDeltaRadius: innerDeltaRadius,
- maxDeltaTheta: remainingDeltaTheta
+ maxDeltaTheta: remainingDeltaTheta,
);
assert(child.parentData is SectorParentData);
child.parentData.theta = innerTheta;
@@ -334,7 +334,7 @@
RenderSectorSlice({
BoxDecoration decoration,
double deltaTheta = kTwoPi,
- double padding = 0.0
+ double padding = 0.0,
}) : _padding = padding, _desiredDeltaTheta = deltaTheta, super(decoration);
double _desiredDeltaTheta;
@@ -377,7 +377,7 @@
while (child != null) {
final SectorConstraints innerConstraints = SectorConstraints(
maxDeltaRadius: remainingDeltaRadius,
- maxDeltaTheta: innerDeltaTheta
+ maxDeltaTheta: innerDeltaTheta,
);
final SectorDimensions childDimensions = child.getIntrinsicDimensions(innerConstraints, childRadius);
childRadius += childDimensions.deltaRadius;
@@ -406,7 +406,7 @@
while (child != null) {
final SectorConstraints innerConstraints = SectorConstraints(
maxDeltaRadius: remainingDeltaRadius,
- maxDeltaTheta: innerDeltaTheta
+ maxDeltaTheta: innerDeltaTheta,
);
child.parentData.theta = innerTheta;
child.parentData.radius = childRadius;
@@ -488,7 +488,7 @@
Size getIntrinsicDimensions({
double width = double.infinity,
- double height = double.infinity
+ double height = double.infinity,
}) {
assert(child is RenderSector);
assert(child.parentData is SectorParentData);
@@ -556,7 +556,7 @@
class RenderSolidColor extends RenderDecoratedSector {
RenderSolidColor(this.backgroundColor, {
this.desiredDeltaRadius = double.infinity,
- this.desiredDeltaTheta = kTwoPi
+ this.desiredDeltaTheta = kTwoPi,
}) : super(BoxDecoration(color: backgroundColor));
double desiredDeltaRadius;
diff --git a/examples/layers/services/isolate.dart b/examples/layers/services/isolate.dart
index 5c689d6..a48958c 100644
--- a/examples/layers/services/isolate.dart
+++ b/examples/layers/services/isolate.dart
@@ -183,7 +183,7 @@
sender.send(<double>[ completed, total ]);
},
onResultListener: sender.send,
- data: message.data
+ data: message.data,
);
calculator.run();
}
@@ -221,7 +221,7 @@
)..repeat();
_calculationManager = CalculationManager(
onProgressListener: _handleProgressUpdate,
- onResultListener: _handleResult
+ onResultListener: _handleResult,
);
}
@@ -243,24 +243,24 @@
width: 120.0,
height: 120.0,
color: const Color(0xFF882222),
- )
+ ),
),
Opacity(
opacity: _calculationManager.isRunning ? 1.0 : 0.0,
child: CircularProgressIndicator(
value: _progress
- )
+ ),
),
Text(_status),
Center(
child: RaisedButton(
child: Text(_label),
- onPressed: _handleButtonPressed
- )
+ onPressed: _handleButtonPressed,
+ ),
),
- Text(_result)
- ]
- )
+ Text(_result),
+ ],
+ ),
);
}
diff --git a/examples/layers/widgets/gestures.dart b/examples/layers/widgets/gestures.dart
index 1e884a9..6dc63ef 100644
--- a/examples/layers/widgets/gestures.dart
+++ b/examples/layers/widgets/gestures.dart
@@ -13,7 +13,7 @@
this.scaleEnabled,
this.tapEnabled,
this.doubleTapEnabled,
- this.longPressEnabled
+ this.longPressEnabled,
});
final double zoom;
@@ -159,9 +159,9 @@
scaleEnabled: _scaleEnabled,
tapEnabled: _tapEnabled,
doubleTapEnabled: _doubleTapEnabled,
- longPressEnabled: _longPressEnabled
- )
- )
+ longPressEnabled: _longPressEnabled,
+ ),
+ ),
),
Positioned(
bottom: 0.0,
@@ -175,45 +175,45 @@
children: <Widget>[
Checkbox(
value: _scaleEnabled,
- onChanged: (bool value) { setState(() { _scaleEnabled = value; }); }
+ onChanged: (bool value) { setState(() { _scaleEnabled = value; }); },
),
const Text('Scale'),
- ]
+ ],
),
Row(
children: <Widget>[
Checkbox(
value: _tapEnabled,
- onChanged: (bool value) { setState(() { _tapEnabled = value; }); }
+ onChanged: (bool value) { setState(() { _tapEnabled = value; }); },
),
const Text('Tap'),
- ]
+ ],
),
Row(
children: <Widget>[
Checkbox(
value: _doubleTapEnabled,
- onChanged: (bool value) { setState(() { _doubleTapEnabled = value; }); }
+ onChanged: (bool value) { setState(() { _doubleTapEnabled = value; }); },
),
const Text('Double Tap'),
- ]
+ ],
),
Row(
children: <Widget>[
Checkbox(
value: _longPressEnabled,
- onChanged: (bool value) { setState(() { _longPressEnabled = value; }); }
+ onChanged: (bool value) { setState(() { _longPressEnabled = value; }); },
),
const Text('Long Press'),
- ]
+ ],
),
],
- crossAxisAlignment: CrossAxisAlignment.start
- )
- )
- )
+ crossAxisAlignment: CrossAxisAlignment.start,
+ ),
+ ),
+ ),
),
- ]
+ ],
);
}
}
@@ -223,7 +223,7 @@
theme: ThemeData.dark(),
home: Scaffold(
appBar: AppBar(title: const Text('Gestures Demo')),
- body: GestureDemo()
- )
+ body: GestureDemo(),
+ ),
));
}
diff --git a/examples/layers/widgets/media_query.dart b/examples/layers/widgets/media_query.dart
index 091fadb..4ef2687 100644
--- a/examples/layers/widgets/media_query.dart
+++ b/examples/layers/widgets/media_query.dart
@@ -19,8 +19,8 @@
margin: const EdgeInsets.all(8.0),
color: Colors.lightBlueAccent.shade100,
),
- Text(name)
- ]
+ Text(name),
+ ],
);
}
}
@@ -38,24 +38,24 @@
Expanded(
child: Container(
color: Colors.lightBlueAccent.shade100,
- )
+ ),
),
Container(
margin: const EdgeInsets.only(left: 8.0),
child: Row(
children: <Widget>[
Expanded(
- child: Text(name)
+ child: Text(name),
),
const IconButton(
icon: Icon(Icons.more_vert),
- onPressed: null
- )
- ]
- )
- )
- ]
- )
+ onPressed: null,
+ ),
+ ],
+ ),
+ ),
+ ],
+ ),
);
}
}
@@ -99,9 +99,9 @@
title: 'Media Query Example',
home: Scaffold(
appBar: AppBar(
- title: const Text('Media Query Example')
+ title: const Text('Media Query Example'),
),
- body: Material(child: AdaptiveContainer(names: _kNames))
- )
+ body: Material(child: AdaptiveContainer(names: _kNames)),
+ ),
));
}
diff --git a/examples/layers/widgets/sectors.dart b/examples/layers/widgets/sectors.dart
index 553e8af..2b64e99 100644
--- a/examples/layers/widgets/sectors.dart
+++ b/examples/layers/widgets/sectors.dart
@@ -12,7 +12,7 @@
RenderBox initCircle() {
return RenderBoxToRenderSectorAdapter(
innerRadius: 25.0,
- child: RenderSectorRing(padding: 0.0)
+ child: RenderSectorRing(padding: 0.0),
);
}
@@ -74,7 +74,7 @@
ring.add(RenderSolidColor(color, desiredDeltaTheta: kTwoPi * 0.2));
return RenderBoxToRenderSectorAdapter(
innerRadius: 5.0,
- child: ring
+ child: ring,
);
}
RenderBoxToRenderSectorAdapter sectorAddIcon = initSector(const Color(0xFF00DD00));
@@ -104,12 +104,12 @@
Container(
padding: const EdgeInsets.all(4.0),
margin: const EdgeInsets.only(right: 10.0),
- child: WidgetToRenderBoxAdapter(renderBox: sectorAddIcon)
+ child: WidgetToRenderBoxAdapter(renderBox: sectorAddIcon),
),
const Text('ADD SECTOR'),
- ]
- )
- )
+ ],
+ ),
+ ),
),
RaisedButton(
onPressed: _enabledRemove ? removeSector : null,
@@ -119,16 +119,16 @@
Container(
padding: const EdgeInsets.all(4.0),
margin: const EdgeInsets.only(right: 10.0),
- child: WidgetToRenderBoxAdapter(renderBox: sectorRemoveIcon)
+ child: WidgetToRenderBoxAdapter(renderBox: sectorRemoveIcon),
),
const Text('REMOVE SECTOR'),
- ]
- )
- )
+ ],
+ ),
+ ),
),
],
- mainAxisAlignment: MainAxisAlignment.spaceAround
- )
+ mainAxisAlignment: MainAxisAlignment.spaceAround,
+ ),
),
Expanded(
child: Container(
@@ -139,12 +139,12 @@
padding: const EdgeInsets.all(8.0),
child: WidgetToRenderBoxAdapter(
renderBox: sectors,
- onBuild: doUpdates
- )
- )
+ onBuild: doUpdates,
+ ),
+ ),
),
],
- mainAxisAlignment: MainAxisAlignment.spaceBetween
+ mainAxisAlignment: MainAxisAlignment.spaceBetween,
);
}
@@ -155,10 +155,10 @@
title: 'Sector Layout',
home: Scaffold(
appBar: AppBar(
- title: const Text('Sector Layout in a Widget Tree')
+ title: const Text('Sector Layout in a Widget Tree'),
),
- body: buildBody()
- )
+ body: buildBody(),
+ ),
);
}
}
diff --git a/examples/layers/widgets/spinning_mixed.dart b/examples/layers/widgets/spinning_mixed.dart
index 4801ac7..b9f4d1c 100644
--- a/examples/layers/widgets/spinning_mixed.dart
+++ b/examples/layers/widgets/spinning_mixed.dart
@@ -26,7 +26,7 @@
return Expanded(
child: Container(
color: color,
- )
+ ),
);
}
}
diff --git a/examples/layers/widgets/spinning_square.dart b/examples/layers/widgets/spinning_square.dart
index 6539ffc..efaae8c 100644
--- a/examples/layers/widgets/spinning_square.dart
+++ b/examples/layers/widgets/spinning_square.dart
@@ -38,7 +38,7 @@
width: 200.0,
height: 200.0,
color: const Color(0xFF00FF00),
- )
+ ),
);
}
}
diff --git a/examples/layers/widgets/styled_text.dart b/examples/layers/widgets/styled_text.dart
index 633d55e..ffabd25 100644
--- a/examples/layers/widgets/styled_text.dart
+++ b/examples/layers/widgets/styled_text.dart
@@ -29,7 +29,7 @@
const TextStyle _kUnderline = TextStyle(
decoration: TextDecoration.underline,
decorationColor: Color(0xFF000000),
- decorationStyle: TextDecorationStyle.wavy
+ decorationStyle: TextDecorationStyle.wavy,
);
Widget toStyledText(String name, String text) {
@@ -44,14 +44,14 @@
children: <TextSpan>[
TextSpan(
style: _kUnderline,
- text: name
+ text: name,
),
- const TextSpan(text: ':')
- ]
+ const TextSpan(text: ':'),
+ ],
),
- TextSpan(text: text)
- ]
- )
+ TextSpan(text: text),
+ ],
+ ),
);
}
@@ -67,7 +67,7 @@
border: Border(
bottom: BorderSide(color: Color.fromARGB(24, 0, 0, 0))
)
- )
+ ),
);
}
}
@@ -112,9 +112,9 @@
child: Column(
children: children,
mainAxisAlignment: MainAxisAlignment.center,
- crossAxisAlignment: CrossAxisAlignment.start
- )
- )
+ crossAxisAlignment: CrossAxisAlignment.start,
+ ),
+ ),
);
}
}
@@ -124,12 +124,12 @@
theme: ThemeData.light(),
home: Scaffold(
appBar: AppBar(
- title: const Text('Hal and Dave')
+ title: const Text('Hal and Dave'),
),
body: Material(
color: Colors.grey.shade50,
- child: StyledTextDemo()
- )
- )
+ child: StyledTextDemo(),
+ ),
+ ),
));
}
diff --git a/examples/stocks/lib/i18n/stock_messages_en.dart b/examples/stocks/lib/i18n/stock_messages_en.dart
index 04eb511..258504d 100644
--- a/examples/stocks/lib/i18n/stock_messages_en.dart
+++ b/examples/stocks/lib/i18n/stock_messages_en.dart
@@ -21,6 +21,6 @@
static _notInlinedMessages(_) => <String, Function> {
"market" : MessageLookupByLibrary.simpleMessage("MARKET"),
"portfolio" : MessageLookupByLibrary.simpleMessage("PORTFOLIO"),
- "title" : MessageLookupByLibrary.simpleMessage("Stocks")
+ "title" : MessageLookupByLibrary.simpleMessage("Stocks"),
};
}
diff --git a/examples/stocks/lib/i18n/stock_messages_es.dart b/examples/stocks/lib/i18n/stock_messages_es.dart
index 0d8943f..136be0b 100644
--- a/examples/stocks/lib/i18n/stock_messages_es.dart
+++ b/examples/stocks/lib/i18n/stock_messages_es.dart
@@ -21,6 +21,6 @@
static _notInlinedMessages(_) => <String, Function> {
"market" : MessageLookupByLibrary.simpleMessage("MERCADO"),
"portfolio" : MessageLookupByLibrary.simpleMessage("CARTERA"),
- "title" : MessageLookupByLibrary.simpleMessage("Acciones")
+ "title" : MessageLookupByLibrary.simpleMessage("Acciones"),
};
}
diff --git a/examples/stocks/lib/main.dart b/examples/stocks/lib/main.dart
index 5ee32aa..94877e1 100644
--- a/examples/stocks/lib/main.dart
+++ b/examples/stocks/lib/main.dart
@@ -51,7 +51,7 @@
debugShowPointers: false,
debugShowRainbow: false,
showPerformanceOverlay: false,
- showSemanticsDebugger: false
+ showSemanticsDebugger: false,
);
@override
@@ -71,12 +71,12 @@
case StockMode.optimistic:
return ThemeData(
brightness: Brightness.light,
- primarySwatch: Colors.purple
+ primarySwatch: Colors.purple,
);
case StockMode.pessimistic:
return ThemeData(
brightness: Brightness.dark,
- accentColor: Colors.redAccent
+ accentColor: Colors.redAccent,
);
}
assert(_configuration.stockMode != null);
@@ -122,7 +122,7 @@
showSemanticsDebugger: _configuration.showSemanticsDebugger,
routes: <String, WidgetBuilder>{
'/': (BuildContext context) => StockHome(stocks, _configuration, configurationUpdater),
- '/settings': (BuildContext context) => StockSettings(_configuration, configurationUpdater)
+ '/settings': (BuildContext context) => StockSettings(_configuration, configurationUpdater),
},
onGenerateRoute: _getRoute,
);
diff --git a/examples/stocks/lib/stock_arrow.dart b/examples/stocks/lib/stock_arrow.dart
index cbd78f0..1a8c0b0 100644
--- a/examples/stocks/lib/stock_arrow.dart
+++ b/examples/stocks/lib/stock_arrow.dart
@@ -79,9 +79,9 @@
painter: StockArrowPainter(
// TODO(jackson): This should change colors with the theme
color: _colorForPercentChange(percentChange),
- percentChange: percentChange
- )
- )
+ percentChange: percentChange,
+ ),
+ ),
);
}
}
diff --git a/examples/stocks/lib/stock_list.dart b/examples/stocks/lib/stock_list.dart
index d61c0c3..5acc8e5 100644
--- a/examples/stocks/lib/stock_list.dart
+++ b/examples/stocks/lib/stock_list.dart
@@ -26,7 +26,7 @@
stock: stocks[index],
onPressed: onOpen,
onDoubleTap: onShow,
- onLongPressed: onAction
+ onLongPressed: onAction,
);
},
);
diff --git a/examples/stocks/lib/stock_row.dart b/examples/stocks/lib/stock_row.dart
index 3ced34a..99c6c96 100644
--- a/examples/stocks/lib/stock_row.dart
+++ b/examples/stocks/lib/stock_row.dart
@@ -14,7 +14,7 @@
this.stock,
this.onPressed,
this.onDoubleTap,
- this.onLongPressed
+ this.onLongPressed,
}) : super(key: ObjectKey(stock));
final Stock stock;
@@ -51,8 +51,8 @@
margin: const EdgeInsets.only(right: 5.0),
child: Hero(
tag: stock,
- child: StockArrow(percentChange: stock.percentChange)
- )
+ child: StockArrow(percentChange: stock.percentChange),
+ ),
),
Expanded(
child: Row(
@@ -61,28 +61,28 @@
flex: 2,
child: Text(
stock.symbol
- )
+ ),
),
Expanded(
child: Text(
lastSale,
- textAlign: TextAlign.right
- )
+ textAlign: TextAlign.right,
+ ),
),
Expanded(
child: Text(
changeInPrice,
- textAlign: TextAlign.right
- )
+ textAlign: TextAlign.right,
+ ),
),
],
crossAxisAlignment: CrossAxisAlignment.baseline,
- textBaseline: DefaultTextStyle.of(context).style.textBaseline
- )
+ textBaseline: DefaultTextStyle.of(context).style.textBaseline,
+ ),
),
- ]
- )
- )
+ ],
+ ),
+ ),
);
}
}
diff --git a/examples/stocks/lib/stock_settings.dart b/examples/stocks/lib/stock_settings.dart
index 3919096..68d77d2 100644
--- a/examples/stocks/lib/stock_settings.dart
+++ b/examples/stocks/lib/stock_settings.dart
@@ -76,13 +76,13 @@
child: const Text('NO THANKS'),
onPressed: () {
Navigator.pop(context, false);
- }
+ },
),
FlatButton(
child: const Text('AGREE'),
onPressed: () {
Navigator.pop(context, true);
- }
+ },
),
],
);
@@ -99,7 +99,7 @@
Widget buildAppBar(BuildContext context) {
return AppBar(
- title: const Text('Settings')
+ title: const Text('Settings'),
);
}
@@ -212,7 +212,7 @@
Widget build(BuildContext context) {
return Scaffold(
appBar: buildAppBar(context),
- body: buildSettingsPane(context)
+ body: buildSettingsPane(context),
);
}
}
diff --git a/examples/stocks/lib/stock_symbol_viewer.dart b/examples/stocks/lib/stock_symbol_viewer.dart
index e1f069c..b5ce651 100644
--- a/examples/stocks/lib/stock_symbol_viewer.dart
+++ b/examples/stocks/lib/stock_symbol_viewer.dart
@@ -30,11 +30,11 @@
children: <Widget>[
Text(
'${stock.symbol}',
- style: Theme.of(context).textTheme.display2
+ style: Theme.of(context).textTheme.display2,
),
arrow,
],
- mainAxisAlignment: MainAxisAlignment.spaceBetween
+ mainAxisAlignment: MainAxisAlignment.spaceBetween,
),
Text('Last Sale', style: headings),
Text('$lastSale ($changeInPrice)'),
@@ -53,12 +53,12 @@
children: const <TextSpan>[
TextSpan(text: 'several', style: TextStyle(fontStyle: FontStyle.italic)),
TextSpan(text: ' years.'),
- ]
- )
+ ],
+ ),
),
],
- mainAxisSize: MainAxisSize.min
- )
+ mainAxisSize: MainAxisSize.min,
+ ),
);
}
}
@@ -77,7 +77,7 @@
final Stock stock = stocks[symbol];
return Scaffold(
appBar: AppBar(
- title: Text(stock?.name ?? symbol)
+ title: Text(stock?.name ?? symbol),
),
body: SingleChildScrollView(
child: Container(
@@ -102,9 +102,9 @@
),
crossFadeState: stock == null && stocks.loading ? CrossFadeState.showFirst : CrossFadeState.showSecond,
),
- )
- )
- )
+ ),
+ ),
+ ),
);
},
);
@@ -125,8 +125,8 @@
),
child: _StockSymbolView(
stock: stock,
- arrow: StockArrow(percentChange: stock.percentChange)
- )
+ arrow: StockArrow(percentChange: stock.percentChange),
+ ),
);
}
}
diff --git a/examples/stocks/lib/stock_types.dart b/examples/stocks/lib/stock_types.dart
index 7ffe63e..7868674 100644
--- a/examples/stocks/lib/stock_types.dart
+++ b/examples/stocks/lib/stock_types.dart
@@ -18,7 +18,7 @@
@required this.debugShowPointers,
@required this.debugShowRainbow,
@required this.showPerformanceOverlay,
- @required this.showSemanticsDebugger
+ @required this.showSemanticsDebugger,
}) : assert(stockMode != null),
assert(backupMode != null),
assert(debugShowGrid != null),
@@ -51,7 +51,7 @@
bool debugShowPointers,
bool debugShowRainbow,
bool showPerformanceOverlay,
- bool showSemanticsDebugger
+ bool showSemanticsDebugger,
}) {
return StockConfiguration(
stockMode: stockMode ?? this.stockMode,
@@ -63,7 +63,7 @@
debugShowPointers: debugShowPointers ?? this.debugShowPointers,
debugShowRainbow: debugShowRainbow ?? this.debugShowRainbow,
showPerformanceOverlay: showPerformanceOverlay ?? this.showPerformanceOverlay,
- showSemanticsDebugger: showSemanticsDebugger ?? this.showSemanticsDebugger
+ showSemanticsDebugger: showSemanticsDebugger ?? this.showSemanticsDebugger,
);
}
}