From 818cccfd47fe91e85d525d58506aab9c9890b2c9 Mon Sep 17 00:00:00 2001 From: Amir Hardon Date: Fri, 9 Nov 2018 10:21:44 -0800 Subject: [PATCH] Fix wrong `flutter/platform_views` protocol implementation on iOS. (flutter/engine#6803) The `id` parameter of onDispose is passed as the method argument and not as part of a map. --- .../darwin/ios/framework/Source/FlutterPlatformViews.mm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/engine/src/flutter/shell/platform/darwin/ios/framework/Source/FlutterPlatformViews.mm b/engine/src/flutter/shell/platform/darwin/ios/framework/Source/FlutterPlatformViews.mm index 01c7e63126..6ca2f334dd 100644 --- a/engine/src/flutter/shell/platform/darwin/ios/framework/Source/FlutterPlatformViews.mm +++ b/engine/src/flutter/shell/platform/darwin/ios/framework/Source/FlutterPlatformViews.mm @@ -89,8 +89,8 @@ void FlutterPlatformViewsController::OnCreate(FlutterMethodCall* call, FlutterRe } void FlutterPlatformViewsController::OnDispose(FlutterMethodCall* call, FlutterResult& result) { - NSDictionary* args = [call arguments]; - int64_t viewId = [args[@"id"] longLongValue]; + NSNumber* arg = [call arguments]; + int64_t viewId = [arg longLongValue]; if (views_.count(viewId) == 0) { result([FlutterError errorWithCode:@"unknown_view"