From 93fbaf157cda384d9ebc7055520a79ef848b7676 Mon Sep 17 00:00:00 2001 From: Jason Simmons Date: Thu, 19 Nov 2020 07:33:04 -0800 Subject: [PATCH] Fix type cast null safety in MethodChannel._invokeMethod (#70809) --- packages/flutter/lib/src/services/platform_channel.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/flutter/lib/src/services/platform_channel.dart b/packages/flutter/lib/src/services/platform_channel.dart index 653eee749b..a2df96c178 100644 --- a/packages/flutter/lib/src/services/platform_channel.dart +++ b/packages/flutter/lib/src/services/platform_channel.dart @@ -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].