diff --git a/packages/flutter_tools/test/integration.shard/analyze_once_test.dart b/packages/flutter_tools/test/integration.shard/analyze_once_test.dart index c679cffd9b..d27868ce91 100644 --- a/packages/flutter_tools/test/integration.shard/analyze_once_test.dart +++ b/packages/flutter_tools/test/integration.shard/analyze_once_test.dart @@ -2,8 +2,6 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// @dart = 2.8 - import 'package:flutter_tools/src/base/file_system.dart'; import 'package:flutter_tools/src/base/io.dart'; import '../src/common.dart'; @@ -12,12 +10,12 @@ import 'test_utils.dart'; final String analyzerSeparator = platform.isWindows ? '-' : '•'; void main() { - Directory tempDir; - String projectPath; - File libMain; + late Directory tempDir; + late String projectPath; + late File libMain; Future runCommand({ - List arguments, + List arguments = const [], List statusTextContains = const [], List errorTextContains = const [], String exitMessageContains = '', diff --git a/packages/flutter_tools/test/integration.shard/analyze_size_test.dart b/packages/flutter_tools/test/integration.shard/analyze_size_test.dart index 1fe91a542a..949bf6fe30 100644 --- a/packages/flutter_tools/test/integration.shard/analyze_size_test.dart +++ b/packages/flutter_tools/test/integration.shard/analyze_size_test.dart @@ -2,8 +2,6 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// @dart = 2.8 - import 'package:file/file.dart'; import 'package:file_testing/file_testing.dart'; import 'package:flutter_tools/src/base/io.dart'; diff --git a/packages/flutter_tools/test/integration.shard/android_plugin_example_app_build_test.dart b/packages/flutter_tools/test/integration.shard/android_plugin_example_app_build_test.dart index d7da32183c..86ffbd3b8a 100644 --- a/packages/flutter_tools/test/integration.shard/android_plugin_example_app_build_test.dart +++ b/packages/flutter_tools/test/integration.shard/android_plugin_example_app_build_test.dart @@ -2,8 +2,6 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// @dart = 2.8 - import 'package:file_testing/file_testing.dart'; import 'package:flutter_tools/src/base/file_system.dart'; @@ -11,7 +9,7 @@ import '../src/common.dart'; import 'test_utils.dart'; void main() { - Directory tempDir; + late Directory tempDir; setUp(() async { tempDir = createResolvedTempDirectorySync('flutter_plugin_test.'); diff --git a/packages/flutter_tools/test/integration.shard/background_isolate_test.dart b/packages/flutter_tools/test/integration.shard/background_isolate_test.dart index bc1cb9a67f..193f1bbff0 100644 --- a/packages/flutter_tools/test/integration.shard/background_isolate_test.dart +++ b/packages/flutter_tools/test/integration.shard/background_isolate_test.dart @@ -2,8 +2,6 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// @dart = 2.8 - import 'dart:async'; import 'package:file/file.dart'; @@ -14,7 +12,7 @@ import 'test_driver.dart'; import 'test_utils.dart'; void main() { - Directory tempDir; + late Directory tempDir; setUp(() async { tempDir = createResolvedTempDirectorySync('hot_reload_test.'); @@ -56,7 +54,7 @@ void main() { // Wait a tiny amount of time in case we did not kill the background isolate. await Future.delayed(const Duration(milliseconds: 10)); await subscription.cancel(); - await flutter?.stop(); + await flutter.stop(); }); testWithoutContext('Hot reload updates background isolates', () async { @@ -84,6 +82,6 @@ void main() { await flutter.hotReload(); await sawNewBackgroundMessage.future; await subscription.cancel(); - await flutter?.stop(); + await flutter.stop(); }); } diff --git a/packages/flutter_tools/test/integration.shard/build_ios_config_only_test.dart b/packages/flutter_tools/test/integration.shard/build_ios_config_only_test.dart index f5adc08a02..63d1abfe57 100644 --- a/packages/flutter_tools/test/integration.shard/build_ios_config_only_test.dart +++ b/packages/flutter_tools/test/integration.shard/build_ios_config_only_test.dart @@ -2,8 +2,6 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// @dart = 2.8 - import 'package:file_testing/file_testing.dart'; import 'package:flutter_tools/src/base/file_system.dart'; import 'package:flutter_tools/src/base/io.dart'; diff --git a/packages/flutter_tools/test/integration.shard/command_output_test.dart b/packages/flutter_tools/test/integration.shard/command_output_test.dart index e1fa2197b8..0023ce8753 100644 --- a/packages/flutter_tools/test/integration.shard/command_output_test.dart +++ b/packages/flutter_tools/test/integration.shard/command_output_test.dart @@ -2,8 +2,6 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// @dart = 2.8 - import 'dart:convert'; import 'package:flutter_tools/src/base/file_system.dart'; @@ -138,11 +136,11 @@ void main() { '--machine', ]); - final Map versionInfo = json.decode(result.stdout + final Map versionInfo = json.decode(result.stdout .toString() .replaceAll('Building flutter tool...', '') .replaceAll('Waiting for another flutter command to release the startup lock...', '') - .trim()) as Map; + .trim()) as Map; expect(versionInfo, containsPair('flutterRoot', isNotNull)); }); diff --git a/packages/flutter_tools/test/integration.shard/coverage_collection_test.dart b/packages/flutter_tools/test/integration.shard/coverage_collection_test.dart index d6bbe45e68..22a52a3a01 100644 --- a/packages/flutter_tools/test/integration.shard/coverage_collection_test.dart +++ b/packages/flutter_tools/test/integration.shard/coverage_collection_test.dart @@ -2,8 +2,6 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// @dart = 2.8 - import 'package:file/file.dart'; import 'package:file_testing/file_testing.dart'; @@ -14,7 +12,7 @@ import 'test_driver.dart'; import 'test_utils.dart'; void main() { - Directory tempDir; + late Directory tempDir; setUp(() async { tempDir = createResolvedTempDirectorySync('flutter_coverage_collection_test.'); diff --git a/packages/flutter_tools/test/integration.shard/debugger_stepping_test.dart b/packages/flutter_tools/test/integration.shard/debugger_stepping_test.dart index a6f96d925d..2b259c2b70 100644 --- a/packages/flutter_tools/test/integration.shard/debugger_stepping_test.dart +++ b/packages/flutter_tools/test/integration.shard/debugger_stepping_test.dart @@ -2,8 +2,6 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// @dart = 2.8 - import 'package:file/file.dart'; import '../src/common.dart'; @@ -12,7 +10,7 @@ import 'test_driver.dart'; import 'test_utils.dart'; void main() { - Directory tempDir; + late Directory tempDir; setUp(() async { tempDir = createResolvedTempDirectorySync('debugger_stepping_test.'); @@ -32,13 +30,13 @@ void main() { await _flutter.addBreakpoint(_project.breakpointUri, _project.breakpointLine); await _flutter.resume(waitForNextPause: true); // Now we should be on the breakpoint. - expect((await _flutter.getSourceLocation()).line, equals(_project.breakpointLine)); + expect((await _flutter.getSourceLocation())?.line, equals(_project.breakpointLine)); // Issue 5 steps, ensuring that we end up on the annotated lines each time. for (int i = 1; i <= _project.numberOfSteps; i += 1) { await _flutter.stepOverOrOverAsyncSuspension(); - final SourcePosition location = await _flutter.getSourceLocation(); - final int actualLine = location.line; + final SourcePosition? location = await _flutter.getSourceLocation(); + final int? actualLine = location?.line; // Get the line we're expected to stop at by searching for the comment // within the source code.