From 5366078e5b15dc49bfc22d9be0d31e2736d765cc Mon Sep 17 00:00:00 2001 From: pichillilorenzo Date: Sat, 13 Oct 2018 21:14:31 +0200 Subject: [PATCH] updated example/lib/main.dart --- .idea/workspace.xml | 83 ++++++++++++++++++------------------------- example/lib/main.dart | 24 ++++++------- 2 files changed, 47 insertions(+), 60 deletions(-) diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 924b998e..d3b243d0 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -15,20 +15,7 @@ - - - - - - - - - - - - - @@ -66,11 +53,11 @@ - + - + @@ -80,11 +67,11 @@ - + - - + + @@ -93,8 +80,8 @@ - - + + @@ -181,10 +168,10 @@ @@ -406,9 +393,9 @@ - + - + @@ -701,30 +688,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - @@ -750,7 +713,7 @@ - + @@ -759,6 +722,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/example/lib/main.dart b/example/lib/main.dart index 899c64e1..07a58c93 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -13,9 +13,9 @@ class MyInAppBrowser extends InAppBrowser { Future onLoadStop(String url) async { print("\n\nStopped $url\n\n"); - await this.injectScriptCode("window.flutter_inappbrowser.callHandler('handlerTest', 1, 5,'string', {'key': 5}, [4,6,8]);"); - await this.injectScriptCode("window.flutter_inappbrowser.callHandler('handlerTest2', false, null, undefined);"); - await this.injectScriptCode("setTimeout(function(){window.flutter_inappbrowser.callHandler('handlerTest', 'anotherString');}, 1000);"); +// await this.injectScriptCode("window.flutter_inappbrowser.callHandler('handlerTest', 1, 5,'string', {'key': 5}, [4,6,8]);"); +// await this.injectScriptCode("window.flutter_inappbrowser.callHandler('handlerTest2', false, null, undefined);"); +// await this.injectScriptCode("setTimeout(function(){window.flutter_inappbrowser.callHandler('handlerTest', 'anotherString');}, 1000);"); // // await this.injectScriptCode("console.log({'testObject': 5});"); // await this.injectScriptCode("console.warn('testWarn',null);"); @@ -131,15 +131,15 @@ class _MyAppState extends State { @override void initState() { super.initState(); - int indexTest = inAppBrowserFallback.addJavaScriptHandler("handlerTest", (arguments) async { - print("handlerTest arguments"); - print(arguments); - }); - int indexTest2 = inAppBrowserFallback.addJavaScriptHandler("test2", (arguments) async { - print("handlerTest2 arguments"); - print(arguments); - inAppBrowserFallback.removeJavaScriptHandler("test", indexTest); - }); +// int indexTest = inAppBrowserFallback.addJavaScriptHandler("handlerTest", (arguments) async { +// print("handlerTest arguments"); +// print(arguments); +// }); +// int indexTest2 = inAppBrowserFallback.addJavaScriptHandler("test2", (arguments) async { +// print("handlerTest2 arguments"); +// print(arguments); +// inAppBrowserFallback.removeJavaScriptHandler("test", indexTest); +// }); } @override