Remove 1745 decorative breaks (#123259)

Remove 1745 decorative breaks
This commit is contained in:
Michael Goderbauer
2023-03-22 14:12:22 -07:00
committed by GitHub
parent 14a15dedbe
commit fda9ecfef7
291 changed files with 2 additions and 1749 deletions

View File

@@ -50,14 +50,12 @@ Widget builds: $_widgetBuilds''';
_state = FrameState.slow;
_icon = Icons.stop;
channel.invokeMethod<void>('start', _flutterFrameRate ~/ 2);
break;
case FrameState.slow:
debugPrint('Stopping .5x speed test...');
await channel.invokeMethod<void>('stop');
await _summarizeStats();
_icon = Icons.fast_forward;
_state = FrameState.afterSlow;
break;
case FrameState.afterSlow:
debugPrint('Starting 2x speed test...');
_widgetBuilds = 0;
@@ -65,20 +63,17 @@ Widget builds: $_widgetBuilds''';
_state = FrameState.fast;
_icon = Icons.stop;
channel.invokeMethod<void>('start', (_flutterFrameRate * 2).toInt());
break;
case FrameState.fast:
debugPrint('Stopping 2x speed test...');
await channel.invokeMethod<void>('stop');
await _summarizeStats();
_state = FrameState.afterFast;
_icon = Icons.replay;
break;
case FrameState.afterFast:
debugPrint('Test complete.');
_summary = 'Press play to start again';
_state = FrameState.initial;
_icon = Icons.play_arrow;
break;
}
setState(() {});
}

View File

@@ -155,22 +155,18 @@ class CalcExpression {
case ExpressionState.Start:
// Start a new number with digit.
newToken = IntToken('$digit');
break;
case ExpressionState.LeadingNeg:
// Replace the leading neg with a negative number starting with digit.
outList.removeLast();
newToken = IntToken('-$digit');
break;
case ExpressionState.Number:
final ExpressionToken last = outList.removeLast()!;
newToken = IntToken('${last.stringRep}$digit');
break;
case ExpressionState.Point:
case ExpressionState.NumberWithPoint:
final ExpressionToken last = outList.removeLast()!;
newState = ExpressionState.NumberWithPoint;
newToken = FloatToken('${last.stringRep}$digit');
break;
case ExpressionState.Result:
// Cannot enter a number now
return null;
@@ -188,13 +184,11 @@ class CalcExpression {
switch (state) {
case ExpressionState.Start:
newToken = FloatToken('.');
break;
case ExpressionState.LeadingNeg:
case ExpressionState.Number:
final ExpressionToken last = outList.removeLast()!;
final String value = last.stringRep!;
newToken = FloatToken('$value.');
break;
case ExpressionState.Point:
case ExpressionState.NumberWithPoint:
case ExpressionState.Result:
@@ -292,10 +286,8 @@ class CalcExpression {
switch (opToken.operation) {
case Operation.Addition:
currentTermValue += nextTermValue;
break;
case Operation.Subtraction:
currentTermValue -= nextTermValue;
break;
case Operation.Multiplication:
case Operation.Division:
// Logic error.

View File

@@ -603,11 +603,9 @@ class Tab2ConversationBubble extends StatelessWidget {
case Tab2ConversationBubbleColor.gray:
backgroundColor = CupertinoDynamicColor.resolve(CupertinoColors.systemFill, context);
foregroundColor = CupertinoDynamicColor.resolve(CupertinoColors.label, context);
break;
case Tab2ConversationBubbleColor.blue:
backgroundColor = CupertinoTheme.of(context).primaryColor;
foregroundColor = CupertinoColors.white;
break;
case null:
break;
}

View File

@@ -34,13 +34,10 @@ class _BannerDemoState extends State<BannerDemo> {
_displayBanner = true;
_showMultipleActions = true;
_showLeading = true;
break;
case BannerDemoAction.showMultipleActions:
_showMultipleActions = !_showMultipleActions;
break;
case BannerDemoAction.showLeading:
_showLeading = !_showLeading;
break;
}
});
}

View File

@@ -382,13 +382,10 @@ class _CardsDemoState extends State<CardsDemo> {
switch (destination.type) {
case CardDemoType.standard:
child = TravelDestinationItem(destination: destination, shape: _shape);
break;
case CardDemoType.tappable:
child = TappableTravelDestinationItem(destination: destination, shape: _shape);
break;
case CardDemoType.selectable:
child = SelectableTravelDestinationItem(destination: destination, shape: _shape);
break;
}
return Container(

View File

@@ -68,19 +68,14 @@ class LeaveBehindDemoState extends State<LeaveBehindDemo> {
switch (action) {
case LeaveBehindDemoAction.reset:
initListItems();
break;
case LeaveBehindDemoAction.horizontalSwipe:
_dismissDirection = DismissDirection.horizontal;
break;
case LeaveBehindDemoAction.leftSwipe:
_dismissDirection = DismissDirection.endToStart;
break;
case LeaveBehindDemoAction.rightSwipe:
_dismissDirection = DismissDirection.startToEnd;
break;
case LeaveBehindDemoAction.confirmDismiss:
_confirmDismiss = !_confirmDismiss;
break;
}
});
}

View File

@@ -212,13 +212,10 @@ class _ListDemoState extends State<ListDemo> {
case _MaterialListType.oneLine:
case _MaterialListType.oneLineWithAvatar:
itemTypeText = 'Single-line';
break;
case _MaterialListType.twoLine:
itemTypeText = 'Two-line';
break;
case _MaterialListType.threeLine:
itemTypeText = 'Three-line';
break;
case null:
break;
}

View File

@@ -57,11 +57,9 @@ class _ProgressIndicatorDemoState extends State<ProgressIndicatorDemo> with Sing
case AnimationStatus.dismissed:
case AnimationStatus.forward:
_controller.forward();
break;
case AnimationStatus.reverse:
case AnimationStatus.completed:
_controller.reverse();
break;
}
}
});

View File

@@ -143,7 +143,6 @@ class _ListDemoState extends State<ReorderableListDemo> {
subtitle: secondary,
secondary: const Icon(Icons.drag_handle),
);
break;
case _ReorderableListType.horizontalAvatar:
case _ReorderableListType.verticalAvatar:
listTile = SizedBox(
@@ -155,12 +154,10 @@ class _ListDemoState extends State<ReorderableListDemo> {
child: Text(item.value),
),
);
break;
case null:
listTile = Container(
key: Key(item.value),
);
break;
}
return listTile;

View File

@@ -86,26 +86,20 @@ class _CustomRangeThumbShape extends RangeSliderThumbShape {
switch (thumb) {
case Thumb.start:
thumbPath = _rightTriangle(size, center);
break;
case Thumb.end:
thumbPath = _leftTriangle(size, center);
break;
case null:
break;
}
break;
case TextDirection.ltr:
switch (thumb) {
case Thumb.start:
thumbPath = _leftTriangle(size, center);
break;
case Thumb.end:
thumbPath = _rightTriangle(size, center);
break;
case null:
break;
}
break;
case null:
break;
}

View File

@@ -208,7 +208,6 @@ class MotionEventsBodyState extends State<MotionEventsBody> {
flutterViewEvents.removeLast();
}
setState(() {});
break;
}
return Future<dynamic>.value();
}
@@ -222,7 +221,6 @@ class MotionEventsBodyState extends State<MotionEventsBody> {
embeddedViewEvents.removeLast();
}
setState(() {});
break;
}
return Future<dynamic>.value();
}

View File

@@ -236,13 +236,10 @@ class _MyHomePageState extends State<MyHomePage> {
switch (widget.setup) {
case Setup.none:
imageWidget = Container();
break;
case Setup.image:
imageWidget = Image.memory(base64Decode(_displayP3Logo));
break;
case Setup.canvasSaveLayer:
imageWidget = CustomPaint(painter: _SaveLayerDrawer(_image));
break;
case Setup.blur:
imageWidget = Stack(
children: <Widget>[
@@ -258,7 +255,6 @@ class _MyHomePageState extends State<MyHomePage> {
child: Image.memory(base64Decode(_displayP3Logo))),
],
);
break;
}
return Scaffold(