From dbacbf814abe3be3e5cfdba6c8b0eadbe3689233 Mon Sep 17 00:00:00 2001 From: Howard Tseng Date: Sun, 8 Apr 2018 08:32:44 -0400 Subject: [PATCH] Added reloading (Android) --- .../com/flutter_webview_plugin/FlutterWebviewPlugin.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/android/src/main/java/com/flutter_webview_plugin/FlutterWebviewPlugin.java b/android/src/main/java/com/flutter_webview_plugin/FlutterWebviewPlugin.java index 1cbac2c7..d75c605b 100644 --- a/android/src/main/java/com/flutter_webview_plugin/FlutterWebviewPlugin.java +++ b/android/src/main/java/com/flutter_webview_plugin/FlutterWebviewPlugin.java @@ -48,6 +48,9 @@ public void onMethodCall(MethodCall call, MethodChannel.Result result) { case "resize": resize(call, result); break; + case "reload": + reload(call, result); + break; default: result.notImplemented(); break; @@ -111,6 +114,11 @@ private void close(MethodCall call, MethodChannel.Result result) { } } + private void reload(MethodCall call, MethodChannel.Result result) { + if (webViewManager != null) { + webViewManager.reload(call, result); + } + } private void eval(MethodCall call, final MethodChannel.Result result) { if (webViewManager != null) { webViewManager.eval(call, result);