Commit ca5f0c9a authored by Devon Carew's avatar Devon Carew Committed by GitHub

fix the return type on flutterPlatformOverride (#9269)

parent 55e51e79
...@@ -975,14 +975,14 @@ class Isolate extends ServiceObjectOwner { ...@@ -975,14 +975,14 @@ class Isolate extends ServiceObjectOwner {
); );
} }
Future<Null> flutterPlatformOverride([String platform]) async { Future<String> flutterPlatformOverride([String platform]) async {
final Map<String, String> result = await invokeFlutterExtensionRpcRaw( final Map<String, String> result = await invokeFlutterExtensionRpcRaw(
'ext.flutter.platformOverride', 'ext.flutter.platformOverride',
params: platform != null ? <String, dynamic>{ 'value': platform } : <String, String>{}, params: platform != null ? <String, dynamic>{ 'value': platform } : <String, String>{},
timeout: const Duration(seconds: 5), timeout: const Duration(seconds: 5),
timeoutFatal: false, timeoutFatal: false,
); );
if (result != null && result.containsKey('value') && result['value'] is String) if (result != null && result['value'] is String)
return result['value']; return result['value'];
return 'unknown'; return 'unknown';
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment