Migrate platform_interaction to null safety (#80621)
This commit is contained in:
committed by
GitHub
parent
0e979a500f
commit
ff54fc6da8
@@ -14,7 +14,7 @@ Future<TestStepResult> systemNavigatorPop() {
|
||||
|
||||
final Completer<TestStepResult> completer = Completer<TestStepResult>();
|
||||
|
||||
channel.setMessageHandler((String message) async {
|
||||
channel.setMessageHandler((String? message) async {
|
||||
completer.complete(
|
||||
const TestStepResult('System navigation pop', '', TestStatus.ok));
|
||||
return '';
|
||||
|
||||
@@ -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}';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user