未验证 提交 316f6365 编写于 作者: A Amir Hardon 提交者: GitHub

Fix wrong `flutter/platform_views` protocol implementation on iOS. (#6803)

The `id` parameter of onDispose is passed as the method argument and not as
part of a map.
上级 59f79d0d
......@@ -89,8 +89,8 @@ void FlutterPlatformViewsController::OnCreate(FlutterMethodCall* call, FlutterRe
}
void FlutterPlatformViewsController::OnDispose(FlutterMethodCall* call, FlutterResult& result) {
NSDictionary<NSString*, id>* 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"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册