diff --git a/ios/Classes/FlutterWebviewPlugin.m b/ios/Classes/FlutterWebviewPlugin.m index 1f653d32..c2efcbde 100644 --- a/ios/Classes/FlutterWebviewPlugin.m +++ b/ios/Classes/FlutterWebviewPlugin.m @@ -77,7 +77,13 @@ - (void)handleMethodCall:(FlutterMethodCall*)call result:(FlutterResult)result { } else if ([@"reload" isEqualToString:call.method]) { [self reload]; result(nil); - } else { + } else if ([@"canGoBack" isEqualToString:call.method]) { + [self onCanGoBack:call result:result]; + } else if ([@"canGoForward" isEqualToString:call.method]) { + [self onCanGoForward:call result:result]; + } else if ([@"cleanCache" isEqualToString:call.method]) { + [self cleanCache:result]; + } else { result(FlutterMethodNotImplemented); } } @@ -123,6 +129,7 @@ - (void)initWebview:(FlutterMethodCall*)call withResult:(FlutterResult)result { if(cookies != (id)[NSNull null]) { [self setCookies:call.arguments[@"url"] :cookies]; + } if (userAgent != (id)[NSNull null]) { [[NSUserDefaults standardUserDefaults] registerDefaults:@{@"UserAgent": userAgent}];