Fix type cast null safety in MethodChannel._invokeMethod (#70809)

This commit is contained in:
Jason Simmons
2020-11-19 07:33:04 -08:00
committed by GitHub
parent c6290500f8
commit 93fbaf157c

View File

@@ -156,7 +156,7 @@ class MethodChannel {
}
throw MissingPluginException('No implementation found for method $method on channel $name');
}
return codec.decodeEnvelope(result) as T;
return codec.decodeEnvelope(result) as T?;
}
/// Invokes a [method] on this channel with the specified [arguments].