diff --git a/dev/automated_tests/flutter_test/exception_handling_expectation.txt b/dev/automated_tests/flutter_test/exception_handling_expectation.txt index 790f810b97..6471c10b6e 100644 --- a/dev/automated_tests/flutter_test/exception_handling_expectation.txt +++ b/dev/automated_tests/flutter_test/exception_handling_expectation.txt @@ -46,7 +46,7 @@ The following message was thrown running a test: Who lives, who dies, who tells your story\? When the exception was thrown, this was the stack: -#[0-9]+ +main. \(.+[/\\]dev[/\\]automated_tests[/\\]flutter_test[/\\]exception_handling_test\.dart:16:5\) +#[0-9]+ +main. \(.+[/\\]dev[/\\]automated_tests[/\\]flutter_test[/\\]exception_handling_test\.dart:18:5\) <> #[0-9]+ +.+ \(package:flutter_test[/\\]src[/\\]widget_tester\.dart:[0-9]+:[0-9]+\) <> diff --git a/dev/automated_tests/flutter_test/exception_handling_test.dart b/dev/automated_tests/flutter_test/exception_handling_test.dart index f58025dc24..2e0edc3dcc 100644 --- a/dev/automated_tests/flutter_test/exception_handling_test.dart +++ b/dev/automated_tests/flutter_test/exception_handling_test.dart @@ -12,7 +12,9 @@ void main() { testWidgets('Exception handling in test harness - FlutterError', (WidgetTester tester) async { throw FlutterError('Who lives, who dies, who tells your story?'); }); - testWidgets('Exception handling in test harness - uncaught Future error', (WidgetTester tester) async { + testWidgets('Exception handling in test harness - uncaught Future error', ( + WidgetTester tester, + ) async { Future.error('Who lives, who dies, who tells your story?'); }); } diff --git a/dev/automated_tests/integration_test/exception_handling_expectation.txt b/dev/automated_tests/integration_test/exception_handling_expectation.txt index 06e717a149..a46fb3d196 100644 --- a/dev/automated_tests/integration_test/exception_handling_expectation.txt +++ b/dev/automated_tests/integration_test/exception_handling_expectation.txt @@ -32,7 +32,7 @@ The following message was thrown running a test: Who lives, who dies, who tells your story\? When the exception was thrown, this was the stack: -#4 main. \(.+[/\\]dev[/\\]automated_tests[/\\]integration_test[/\\]exception_handling_test\.dart:16:5\) +#4 main. \(.+[/\\]dev[/\\]automated_tests[/\\]integration_test[/\\]exception_handling_test\.dart:18:5\) <> The test description was: Exception handling in test harness - uncaught Future error diff --git a/dev/automated_tests/integration_test/exception_handling_test.dart b/dev/automated_tests/integration_test/exception_handling_test.dart index f58025dc24..2e0edc3dcc 100644 --- a/dev/automated_tests/integration_test/exception_handling_test.dart +++ b/dev/automated_tests/integration_test/exception_handling_test.dart @@ -12,7 +12,9 @@ void main() { testWidgets('Exception handling in test harness - FlutterError', (WidgetTester tester) async { throw FlutterError('Who lives, who dies, who tells your story?'); }); - testWidgets('Exception handling in test harness - uncaught Future error', (WidgetTester tester) async { + testWidgets('Exception handling in test harness - uncaught Future error', ( + WidgetTester tester, + ) async { Future.error('Who lives, who dies, who tells your story?'); }); } diff --git a/packages/flutter_tools/lib/src/resident_runner.dart b/packages/flutter_tools/lib/src/resident_runner.dart index 38dea5ecee..3f62437c35 100644 --- a/packages/flutter_tools/lib/src/resident_runner.dart +++ b/packages/flutter_tools/lib/src/resident_runner.dart @@ -1830,8 +1830,10 @@ class DebugConnectionInfo { /// Returns the next platform value for the switcher. /// /// These values must match what is available in -/// `packages/flutter/lib/src/foundation/binding.dart`. +/// `packages/flutter/lib/src/foundation/platform.dart`. String nextPlatform(String currentPlatform) { + // The following lines are read by a script, which expects a certain format. + // dart format off const List platforms = [ 'android', 'iOS', @@ -1840,6 +1842,7 @@ String nextPlatform(String currentPlatform) { 'linux', 'fuchsia', ]; + // dart format on final int index = platforms.indexOf(currentPlatform); assert(index >= 0, 'unknown platform "$currentPlatform"'); return platforms[(index + 1) % platforms.length];