Trivial nit fixes (#12285)

This commit is contained in:
Ian Hickson
2017-09-27 16:13:48 -07:00
committed by GitHub
parent 4389f07024
commit efb45ea788
44 changed files with 90 additions and 92 deletions

View File

@@ -199,7 +199,7 @@ class GridDemoPhotoItem extends StatelessWidget {
final IconData icon = photo.isFavorite ? Icons.star : Icons.star_border;
switch(tileStyle) {
switch (tileStyle) {
case GridDemoTileStyle.imageOnly:
return image;

View File

@@ -60,7 +60,7 @@ class LeaveBehindDemoState extends State<LeaveBehindDemo> {
}
void handleDemoAction(LeaveBehindDemoAction action) {
switch(action) {
switch (action) {
case LeaveBehindDemoAction.reset:
initListItems();
break;

View File

@@ -83,7 +83,7 @@ class ScrollableTabsDemoState extends State<ScrollableTabsDemo> with SingleTicke
controller: _controller,
isScrollable: true,
tabs: _allPages.map((_Page page) {
switch(_demoStyle) {
switch (_demoStyle) {
case TabsDemoStyle.iconsAndText:
return new Tab(text: page.text, icon: new Icon(page.icon));
case TabsDemoStyle.iconsOnly:

View File

@@ -116,7 +116,7 @@ class DartSyntaxHighlighter extends SyntaxHighlighter {
bool _generateSpans() {
int lastLoopPosition = _scanner.position;
while(!_scanner.isDone) {
while (!_scanner.isDone) {
// Skip White space
_scanner.scan(new RegExp(r"\s+"));
@@ -294,7 +294,7 @@ class DartSyntaxHighlighter extends SyntaxHighlighter {
}
void _simplify() {
for(int i = _spans.length - 2; i >= 0; i -= 1) {
for (int i = _spans.length - 2; i >= 0; i -= 1) {
if (_spans[i].type == _spans[i + 1].type && _spans[i].end == _spans[i + 1].start) {
_spans[i] = new _HighlightSpan(
_spans[i].type,

View File

@@ -121,7 +121,7 @@ Future<Null> saveDurationsHistogram(List<Map<String, dynamic>> events, String ou
final Iterator<Map<String, dynamic>> eventIter = events.iterator;
String lastEventName = '';
String lastRouteName = '';
while(eventIter.moveNext()) {
while (eventIter.moveNext()) {
final String eventName = eventIter.current['name'];
if (!<String>['Start Transition', 'Frame'].contains(eventName))

View File

@@ -282,7 +282,7 @@ class IsolateExampleState extends State<StatefulWidget> with SingleTickerProvide
}
String _getStatus(CalculationState state) {
switch(state) {
switch (state) {
case CalculationState.loading:
return 'Loading...';
case CalculationState.calculating:

View File

@@ -27,7 +27,7 @@ void main() {
await driver.tap(button);
String batteryLevel;
while(batteryLevel == null || batteryLevel.isEmpty) {
while (batteryLevel == null || batteryLevel.isEmpty) {
batteryLevel = await driver.getText(batteryLevelLabel);
}
expect(batteryLevel, isNotEmpty);

View File

@@ -86,7 +86,7 @@ class StockHomeState extends State<StockHome> {
}
void _handleStockMenu(BuildContext context, _StockMenuItem value) {
switch(value) {
switch (value) {
case _StockMenuItem.autorefresh:
setState(() {
_autorefresh = !_autorefresh;