Skip to content

Commit d5fd84b

Browse files
authored
Merge pull request #4 from pedia/schema
ready to 0.0.10
2 parents ddd2c32 + 77bf752 commit d5fd84b

File tree

3 files changed

+6
-14
lines changed

3 files changed

+6
-14
lines changed

android/src/main/java/com/flutter_webview_plugin/FlutterWebviewPlugin.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,8 +158,10 @@ else if (!(boolean) call.argument("hidden")) {
158158
}
159159

160160
private void close(MethodCall call, MethodChannel.Result result) {
161-
ViewGroup vg = (ViewGroup)(webView.getParent());
162-
vg.removeView(webView);
161+
if (View.VISIBLE == webView.getVisibility()) {
162+
ViewGroup vg = (ViewGroup) (webView.getParent());
163+
vg.removeView(webView);
164+
}
163165
webView = null;
164166
result.success(null);
165167

example/lib/main.dart

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,6 @@ class _MyHomePageState extends State<MyHomePage> {
4343
// On urlChanged stream
4444
StreamSubscription<String> _onUrlChanged;
4545

46-
StreamSubscription<String> _onStateChanged;
47-
4846
TextEditingController _urlCtrl =
4947
new TextEditingController(text: "http://github.com");
5048

@@ -59,15 +57,6 @@ class _MyHomePageState extends State<MyHomePage> {
5957
initState() {
6058
super.initState();
6159

62-
_onStateChanged =
63-
flutterWebviewPlugin.onStateChanged.listen((dynamic state) {
64-
if (mounted) {
65-
setState(() {
66-
_history.add("state: $state");
67-
});
68-
}
69-
});
70-
7160
// Add a listener to on destroy WebView, so you can make came actions.
7261
_onDestroy = flutterWebviewPlugin.onDestroy.listen((_) {
7362
if (mounted) {

pubspec.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@ description: Plugin that allow Flutter to communicate with a native Webview.
33
authors:
44
- Hadrien Lejard <[email protected]>
55
- Toufik Zitouni <[email protected]>
6+
67
homepage: https://github.com/dart-flitter/flutter_webview_plugin
7-
version: 0.0.9+1
8+
version: 0.0.10
89

910
flutter:
1011
plugin:

0 commit comments

Comments
 (0)