Skip to content

Commit

Permalink
Merge pull request #4 from pedia/schema
Browse files Browse the repository at this point in the history
ready to 0.0.10
  • Loading branch information
pedia authored Dec 19, 2017
2 parents ddd2c32 + 77bf752 commit d5fd84b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,10 @@ else if (!(boolean) call.argument("hidden")) {
}

private void close(MethodCall call, MethodChannel.Result result) {
ViewGroup vg = (ViewGroup)(webView.getParent());
vg.removeView(webView);
if (View.VISIBLE == webView.getVisibility()) {
ViewGroup vg = (ViewGroup) (webView.getParent());
vg.removeView(webView);
}
webView = null;
result.success(null);

Expand Down
11 changes: 0 additions & 11 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@ class _MyHomePageState extends State<MyHomePage> {
// On urlChanged stream
StreamSubscription<String> _onUrlChanged;

StreamSubscription<String> _onStateChanged;

TextEditingController _urlCtrl =
new TextEditingController(text: "http://github.com");

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

_onStateChanged =
flutterWebviewPlugin.onStateChanged.listen((dynamic state) {
if (mounted) {
setState(() {
_history.add("state: $state");
});
}
});

// Add a listener to on destroy WebView, so you can make came actions.
_onDestroy = flutterWebviewPlugin.onDestroy.listen((_) {
if (mounted) {
Expand Down
3 changes: 2 additions & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ description: Plugin that allow Flutter to communicate with a native Webview.
authors:
- Hadrien Lejard <hadrien.lejard@gmail.com>
- Toufik Zitouni <toufiksapps@gmail.com>
- Pedia <kpedia@163.com>
homepage: https://github.com/dart-flitter/flutter_webview_plugin
version: 0.0.9+1
version: 0.0.10

flutter:
plugin:
Expand Down

0 comments on commit d5fd84b

Please sign in to comment.