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

@@ -80,10 +80,8 @@ class _MyStatefulWidgetState extends State<MyStatefulWidget> {
curve: Curves.easeOut,
);
}
break;
case 1:
showModal(context);
break;
}
setState(
() {

View File

@@ -178,22 +178,17 @@ class _MyCascadingMenuState extends State<MyCascadingMenu> {
applicationName: 'MenuBar Sample',
applicationVersion: '1.0.0',
);
break;
case MenuEntry.hideMessage:
case MenuEntry.showMessage:
showingMessage = !showingMessage;
break;
case MenuEntry.colorMenu:
break;
case MenuEntry.colorRed:
backgroundColor = Colors.red;
break;
case MenuEntry.colorGreen:
backgroundColor = Colors.green;
break;
case MenuEntry.colorBlue:
backgroundColor = Colors.blue;
break;
}
}
}

View File

@@ -169,22 +169,17 @@ class _MyContextMenuState extends State<MyContextMenu> {
applicationName: 'MenuBar Sample',
applicationVersion: '1.0.0',
);
break;
case MenuEntry.showMessage:
case MenuEntry.hideMessage:
showingMessage = !showingMessage;
break;
case MenuEntry.colorMenu:
break;
case MenuEntry.colorRed:
backgroundColor = Colors.red;
break;
case MenuEntry.colorGreen:
backgroundColor = Colors.green;
break;
case MenuEntry.colorBlue:
backgroundColor = Colors.blue;
break;
}
}

View File

@@ -46,12 +46,10 @@ class _PlatformMenuBarExampleState extends State<PlatformMenuBarExample> {
applicationName: 'MenuBar Sample',
applicationVersion: '1.0.0',
);
break;
case MenuSelection.showMessage:
setState(() {
_showMessage = !_showMessage;
});
break;
}
}

View File

@@ -185,15 +185,12 @@ class _RenderSelectableAdapter extends RenderProxyBox with Selectable, Selection
_end = adjustedPoint;
}
result = SelectionUtils.getResultBasedOnRect(renderObjectRect, point);
break;
case SelectionEventType.clear:
_start = _end = null;
break;
case SelectionEventType.selectAll:
case SelectionEventType.selectWord:
_start = Offset.zero;
_end = Offset.infinite;
break;
case SelectionEventType.granularlyExtendSelection:
result = SelectionResult.end;
final GranularlyExtendSelectionEvent extendSelectionEvent = event as GranularlyExtendSelectionEvent;
@@ -218,7 +215,6 @@ class _RenderSelectableAdapter extends RenderProxyBox with Selectable, Selection
}
_start = newOffset;
}
break;
case SelectionEventType.directionallyExtendSelection:
result = SelectionResult.end;
final DirectionallyExtendSelectionEvent extendSelectionEvent = event as DirectionallyExtendSelectionEvent;
@@ -240,7 +236,6 @@ class _RenderSelectableAdapter extends RenderProxyBox with Selectable, Selection
} else {
newOffset = Offset.infinite;
}
break;
case SelectionExtendDirection.nextLine:
case SelectionExtendDirection.forward:
forward = true;
@@ -254,7 +249,6 @@ class _RenderSelectableAdapter extends RenderProxyBox with Selectable, Selection
} else {
newOffset = Offset.zero;
}
break;
}
if (extendSelectionEvent.isEnd) {
if (newOffset == _end) {
@@ -267,7 +261,6 @@ class _RenderSelectableAdapter extends RenderProxyBox with Selectable, Selection
}
_start = newOffset;
}
break;
}
_updateGeometry();
return result;

View File

@@ -87,7 +87,6 @@ class _MyStatefulWidgetState extends State<MyStatefulWidget> {
child: Text('Select a lot'),
),
];
break;
case ConnectionState.waiting:
children = const <Widget>[
SizedBox(
@@ -100,7 +99,6 @@ class _MyStatefulWidgetState extends State<MyStatefulWidget> {
child: Text('Awaiting bids...'),
),
];
break;
case ConnectionState.active:
children = <Widget>[
const Icon(
@@ -113,7 +111,6 @@ class _MyStatefulWidgetState extends State<MyStatefulWidget> {
child: Text('\$${snapshot.data}'),
),
];
break;
case ConnectionState.done:
children = <Widget>[
const Icon(
@@ -126,7 +123,6 @@ class _MyStatefulWidgetState extends State<MyStatefulWidget> {
child: Text('\$${snapshot.data} (closed)'),
),
];
break;
}
}

View File

@@ -49,7 +49,6 @@ class _CascadeLayoutDelegate extends MultiChildLayoutDelegate {
switch (textDirection) {
case TextDirection.rtl:
childPosition += Offset(size.width, 0);
break;
case TextDirection.ltr:
break;
}
@@ -66,11 +65,9 @@ class _CascadeLayoutDelegate extends MultiChildLayoutDelegate {
case TextDirection.rtl:
positionChild(color, childPosition - Offset(currentSize.width, 0));
childPosition += Offset(-currentSize.width, currentSize.height - overlap);
break;
case TextDirection.ltr:
positionChild(color, childPosition);
childPosition += Offset(currentSize.width, currentSize.height - overlap);
break;
}
}
}

View File

@@ -105,7 +105,6 @@ class SignUpPage extends StatelessWidget {
// Assume CollectPersonalInfoPage collects personal info and then
// navigates to 'signup/choose_credentials'.
builder = (BuildContext context) => const CollectPersonalInfoPage();
break;
case 'signup/choose_credentials':
// Assume ChooseCredentialsPage collects new credentials and then
// invokes 'onSignupComplete()'.
@@ -119,7 +118,6 @@ class SignUpPage extends StatelessWidget {
Navigator.of(context).pop();
},
);
break;
default:
throw Exception('Invalid route: ${settings.name}');
}

View File

@@ -32,18 +32,14 @@ void main() {
switch (defaultTargetPlatform) {
case TargetPlatform.iOS:
expect(find.byType(CupertinoTextSelectionToolbarButton), findsAtLeastNWidgets(1));
break;
case TargetPlatform.android:
case TargetPlatform.fuchsia:
expect(find.byType(TextSelectionToolbarTextButton), findsAtLeastNWidgets(1));
break;
case TargetPlatform.linux:
case TargetPlatform.windows:
expect(find.byType(DesktopTextSelectionToolbarButton), findsAtLeastNWidgets(1));
break;
case TargetPlatform.macOS:
expect(find.byType(CupertinoDesktopTextSelectionToolbarButton), findsAtLeastNWidgets(1));
break;
}
expect(find.text('Copy'), findsNothing);
expect(find.text('Cut'), findsNothing);

View File

@@ -23,18 +23,14 @@ void main() {
switch (platform) {
case TargetPlatform.iOS:
expect(theme.builders[platform], isA<CupertinoPageTransitionsBuilder>());
break;
case TargetPlatform.linux:
expect(theme.builders[platform], isA<OpenUpwardsPageTransitionsBuilder>());
break;
case TargetPlatform.macOS:
expect(theme.builders[platform], isA<FadeUpwardsPageTransitionsBuilder>());
break;
case TargetPlatform.android:
case TargetPlatform.fuchsia:
case TargetPlatform.windows:
expect(theme.builders[platform], isNull);
break;
}
}

View File

@@ -25,14 +25,12 @@ void main() {
expect(theme.builders[platform], isA<ZoomPageTransitionsBuilder>());
final ZoomPageTransitionsBuilder builder = theme.builders[platform]! as ZoomPageTransitionsBuilder;
expect(builder.allowSnapshotting, isFalse);
break;
case TargetPlatform.iOS:
case TargetPlatform.macOS:
case TargetPlatform.linux:
case TargetPlatform.fuchsia:
case TargetPlatform.windows:
expect(theme.builders[platform], isNull);
break;
}
}