From 2703d10608d4928a1477f9ba75c98aaa68904f66 Mon Sep 17 00:00:00 2001 From: Jason Simmons Date: Wed, 21 Aug 2024 08:20:14 -0700 Subject: [PATCH] Remove unnecessary breaks in default clauses of switch statements (#7462) See https://dart.googlesource.com/sdk.git/+/045d26bc74209f5acc6466669f89686344e83de2 --- packages/camera/camera/example/lib/main.dart | 1 - packages/camera/camera_android/example/lib/main.dart | 1 - packages/camera/camera_android_camerax/example/lib/main.dart | 1 - .../camera_android_camerax/lib/src/camera_state_error.dart | 1 - packages/camera/camera_avfoundation/example/lib/main.dart | 1 - packages/go_router/example/lib/books/src/screens/books.dart | 1 - packages/rfw/lib/src/dart/text.dart | 1 - .../url_launcher_android/lib/url_launcher_android.dart | 1 - packages/url_launcher/url_launcher_ios/lib/url_launcher_ios.dart | 1 - .../lib/src/webkit_webview_controller.dart | 1 - 10 files changed, 10 deletions(-) diff --git a/packages/camera/camera/example/lib/main.dart b/packages/camera/camera/example/lib/main.dart index f7b209a768b3..120e7f6ec509 100644 --- a/packages/camera/camera/example/lib/main.dart +++ b/packages/camera/camera/example/lib/main.dart @@ -689,7 +689,6 @@ class _CameraExampleHomeState extends State showInSnackBar('Audio access is restricted.'); default: _showCameraException(e); - break; } } diff --git a/packages/camera/camera_android/example/lib/main.dart b/packages/camera/camera_android/example/lib/main.dart index 830052e351f4..0b587ff669a4 100644 --- a/packages/camera/camera_android/example/lib/main.dart +++ b/packages/camera/camera_android/example/lib/main.dart @@ -699,7 +699,6 @@ class _CameraExampleHomeState extends State showInSnackBar('Unknown permission error.'); default: _showCameraException(e); - break; } } diff --git a/packages/camera/camera_android_camerax/example/lib/main.dart b/packages/camera/camera_android_camerax/example/lib/main.dart index 567d400d992c..9eee18c45738 100644 --- a/packages/camera/camera_android_camerax/example/lib/main.dart +++ b/packages/camera/camera_android_camerax/example/lib/main.dart @@ -698,7 +698,6 @@ class _CameraExampleHomeState extends State showInSnackBar('Audio access is restricted.'); default: _showCameraException(e); - break; } } diff --git a/packages/camera/camera_android_camerax/lib/src/camera_state_error.dart b/packages/camera/camera_android_camerax/lib/src/camera_state_error.dart index 2f33d513aa02..fedb85c9e8ad 100644 --- a/packages/camera/camera_android_camerax/lib/src/camera_state_error.dart +++ b/packages/camera/camera_android_camerax/lib/src/camera_state_error.dart @@ -59,7 +59,6 @@ class CameraStateError extends JavaObject { default: description = 'There was an unspecified issue with the current camera state.'; - break; } return '$code : $description'; diff --git a/packages/camera/camera_avfoundation/example/lib/main.dart b/packages/camera/camera_avfoundation/example/lib/main.dart index 9b8b9759f320..6bbfede262cd 100644 --- a/packages/camera/camera_avfoundation/example/lib/main.dart +++ b/packages/camera/camera_avfoundation/example/lib/main.dart @@ -698,7 +698,6 @@ class _CameraExampleHomeState extends State showInSnackBar('Unknown permission error.'); default: _showCameraException(e); - break; } } diff --git a/packages/go_router/example/lib/books/src/screens/books.dart b/packages/go_router/example/lib/books/src/screens/books.dart index c3d8dc8083b3..57fb60f645e3 100644 --- a/packages/go_router/example/lib/books/src/screens/books.dart +++ b/packages/go_router/example/lib/books/src/screens/books.dart @@ -107,7 +107,6 @@ class _BooksScreenState extends State case 0: default: context.go('/books/popular'); - break; } } } diff --git a/packages/rfw/lib/src/dart/text.dart b/packages/rfw/lib/src/dart/text.dart index 4db42dcfbe0d..248f15ea26b4 100644 --- a/packages/rfw/lib/src/dart/text.dart +++ b/packages/rfw/lib/src/dart/text.dart @@ -2065,7 +2065,6 @@ Iterable<_Token> _tokenize(String file) sync* { default: // ignored, comment mode = _TokenizerMode.blockComment; - break; } } } diff --git a/packages/url_launcher/url_launcher_android/lib/url_launcher_android.dart b/packages/url_launcher/url_launcher_android/lib/url_launcher_android.dart index 2c6d01c9b311..63669f847b22 100644 --- a/packages/url_launcher/url_launcher_android/lib/url_launcher_android.dart +++ b/packages/url_launcher/url_launcher_android/lib/url_launcher_android.dart @@ -93,7 +93,6 @@ class UrlLauncherAndroid extends UrlLauncherPlatform { default: // By default, open web URLs in the application. inApp = url.startsWith('http:') || url.startsWith('https:'); - break; } final bool succeeded; diff --git a/packages/url_launcher/url_launcher_ios/lib/url_launcher_ios.dart b/packages/url_launcher/url_launcher_ios/lib/url_launcher_ios.dart index 24b25acb3896..bce7dd0586c9 100644 --- a/packages/url_launcher/url_launcher_ios/lib/url_launcher_ios.dart +++ b/packages/url_launcher/url_launcher_ios/lib/url_launcher_ios.dart @@ -86,7 +86,6 @@ class UrlLauncherIOS extends UrlLauncherPlatform { default: // By default, open web URLs in the application. inApp = url.startsWith('http:') || url.startsWith('https:'); - break; } if (inApp) { diff --git a/packages/webview_flutter/webview_flutter_wkwebview/lib/src/webkit_webview_controller.dart b/packages/webview_flutter/webview_flutter_wkwebview/lib/src/webkit_webview_controller.dart index b62c457fd907..e80dc7273476 100644 --- a/packages/webview_flutter/webview_flutter_wkwebview/lib/src/webkit_webview_controller.dart +++ b/packages/webview_flutter/webview_flutter_wkwebview/lib/src/webkit_webview_controller.dart @@ -640,7 +640,6 @@ class WebKitWebViewController extends PlatformWebViewController { case 'log': default: level = JavaScriptLogLevel.log; - break; } _onConsoleMessageCallback!(