diff --git a/dev/integration_tests/platform_interaction/lib/main.dart b/dev/integration_tests/platform_interaction/lib/main.dart index df08389f6f..15be834194 100644 --- a/dev/integration_tests/platform_interaction/lib/main.dart +++ b/dev/integration_tests/platform_interaction/lib/main.dart @@ -16,7 +16,7 @@ void main() { } class TestApp extends StatefulWidget { - const TestApp({Key key}) : super(key: key); + const TestApp({Key? key}) : super(key: key); @override _TestAppState createState() => _TestAppState(); @@ -26,7 +26,7 @@ class _TestAppState extends State { static final List steps = [ () => systemNavigatorPop(), ]; - Future _result; + Future? _result; int _step = 0; void _executeNextStep() { diff --git a/dev/integration_tests/platform_interaction/lib/src/system_navigation.dart b/dev/integration_tests/platform_interaction/lib/src/system_navigation.dart index 71d82d921f..9b9f5010e5 100644 --- a/dev/integration_tests/platform_interaction/lib/src/system_navigation.dart +++ b/dev/integration_tests/platform_interaction/lib/src/system_navigation.dart @@ -14,7 +14,7 @@ Future systemNavigatorPop() { final Completer completer = Completer(); - channel.setMessageHandler((String message) async { + channel.setMessageHandler((String? message) async { completer.complete( const TestStepResult('System navigation pop', '', TestStatus.ok)); return ''; diff --git a/dev/integration_tests/platform_interaction/lib/src/test_step.dart b/dev/integration_tests/platform_interaction/lib/src/test_step.dart index 61b884904c..f83a190cd8 100644 --- a/dev/integration_tests/platform_interaction/lib/src/test_step.dart +++ b/dev/integration_tests/platform_interaction/lib/src/test_step.dart @@ -23,12 +23,11 @@ class TestStepResult { return const TestStepResult('Executing', nothing, TestStatus.pending); case ConnectionState.done: if (snapshot.hasData) { - return snapshot.data; + return snapshot.data!; } else { - final TestStepResult result = snapshot.error as TestStepResult; - return result; + final Object? result = snapshot.error; + return result! as TestStepResult; } - break; default: throw 'Unsupported state ${snapshot.connectionState}'; } diff --git a/dev/integration_tests/platform_interaction/pubspec.yaml b/dev/integration_tests/platform_interaction/pubspec.yaml index 2a3718ac8a..6f4f505437 100644 --- a/dev/integration_tests/platform_interaction/pubspec.yaml +++ b/dev/integration_tests/platform_interaction/pubspec.yaml @@ -2,7 +2,7 @@ name: platform_interaction description: Integration test for platform interactions. environment: - sdk: ">=2.0.0-dev.68.0 <3.0.0" + sdk: ">=2.12.0 <3.0.0" dependencies: flutter: diff --git a/dev/integration_tests/platform_interaction/test_driver/main_test.dart b/dev/integration_tests/platform_interaction/test_driver/main_test.dart index 6d4fbfd47f..277114c67a 100644 --- a/dev/integration_tests/platform_interaction/test_driver/main_test.dart +++ b/dev/integration_tests/platform_interaction/test_driver/main_test.dart @@ -7,7 +7,7 @@ import 'package:test/test.dart' hide TypeMatcher, isInstanceOf; void main() { group('channel suite', () { - FlutterDriver driver; + late FlutterDriver driver; setUpAll(() async { driver = await FlutterDriver.connect(printCommunication: true); @@ -28,7 +28,7 @@ void main() { }); tearDownAll(() async { - driver?.close(); + driver.close(); }); }); }