Skip to content

Commit

Permalink
Fix wrong flutter/platform_views protocol implementation on iOS. (f…
Browse files Browse the repository at this point in the history
…lutter#6803)

The `id` parameter of onDispose is passed as the method argument and not as
part of a map.
  • Loading branch information
amirh authored Nov 9, 2018
1 parent 59f79d0 commit 316f636
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@
}

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"
Expand Down

0 comments on commit 316f636

Please sign in to comment.