removed download method, injectScriptCode now returns result of the code injected #2, code cleanup
This commit is contained in:
parent
d89cd5df2d
commit
4ebdba09d1
|
@ -5,21 +5,27 @@
|
||||||
<config />
|
<config />
|
||||||
</shared>
|
</shared>
|
||||||
</component>
|
</component>
|
||||||
|
<component name="AndroidLogFilters">
|
||||||
|
<option name="TOOL_WINDOW_CONFIGURED_FILTER" value="Show only selected application" />
|
||||||
|
</component>
|
||||||
<component name="ChangeListManager">
|
<component name="ChangeListManager">
|
||||||
<list default="true" id="9b41f7a2-a71e-4923-91fb-249d7815b3e7" name="Default" comment="">
|
<list default="true" id="9b41f7a2-a71e-4923-91fb-249d7815b3e7" name="Default" comment="">
|
||||||
<change beforePath="" afterPath="$PROJECT_DIR$/android/src/main/java/com/pichillilorenzo/flutter_inappbrowser/RequestPermissionHandler.java" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
|
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/android/build.gradle" afterPath="$PROJECT_DIR$/android/build.gradle" />
|
||||||
<change beforePath="$PROJECT_DIR$/android/src/main/AndroidManifest.xml" afterPath="$PROJECT_DIR$/android/src/main/AndroidManifest.xml" />
|
<change beforePath="$PROJECT_DIR$/android/src/main/AndroidManifest.xml" afterPath="$PROJECT_DIR$/android/src/main/AndroidManifest.xml" />
|
||||||
<change beforePath="$PROJECT_DIR$/android/src/main/java/com/pichillilorenzo/flutter_inappbrowser/InAppBrowser.java" afterPath="$PROJECT_DIR$/android/src/main/java/com/pichillilorenzo/flutter_inappbrowser/InAppBrowser.java" />
|
<change beforePath="$PROJECT_DIR$/android/src/main/java/com/pichillilorenzo/flutter_inappbrowser/InAppBrowser.java" afterPath="" />
|
||||||
<change beforePath="$PROJECT_DIR$/android/src/main/java/com/pichillilorenzo/flutter_inappbrowser/InAppBrowserOptions.java" afterPath="$PROJECT_DIR$/android/src/main/java/com/pichillilorenzo/flutter_inappbrowser/InAppBrowserOptions.java" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/android/src/main/java/com/pichillilorenzo/flutter_inappbrowser/InAppBrowserWebChromeClient.java" afterPath="$PROJECT_DIR$/android/src/main/java/com/pichillilorenzo/flutter_inappbrowser/InAppBrowserWebChromeClient.java" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/android/src/main/java/com/pichillilorenzo/flutter_inappbrowser/InAppBrowserWebViewClient.java" afterPath="$PROJECT_DIR$/android/src/main/java/com/pichillilorenzo/flutter_inappbrowser/InAppBrowserWebViewClient.java" />
|
<change beforePath="$PROJECT_DIR$/android/src/main/java/com/pichillilorenzo/flutter_inappbrowser/InAppBrowserWebViewClient.java" afterPath="$PROJECT_DIR$/android/src/main/java/com/pichillilorenzo/flutter_inappbrowser/InAppBrowserWebViewClient.java" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/android/src/main/java/com/pichillilorenzo/flutter_inappbrowser/RequestPermissionHandler.java" afterPath="$PROJECT_DIR$/android/src/main/java/com/pichillilorenzo/flutter_inappbrowser/RequestPermissionHandler.java" />
|
||||||
<change beforePath="$PROJECT_DIR$/android/src/main/java/com/pichillilorenzo/flutter_inappbrowser/WebViewActivity.java" afterPath="$PROJECT_DIR$/android/src/main/java/com/pichillilorenzo/flutter_inappbrowser/WebViewActivity.java" />
|
<change beforePath="$PROJECT_DIR$/android/src/main/java/com/pichillilorenzo/flutter_inappbrowser/WebViewActivity.java" afterPath="$PROJECT_DIR$/android/src/main/java/com/pichillilorenzo/flutter_inappbrowser/WebViewActivity.java" />
|
||||||
<change beforePath="$PROJECT_DIR$/android/src/main/res/layout/activity_web_view.xml" afterPath="$PROJECT_DIR$/android/src/main/res/layout/activity_web_view.xml" />
|
<change beforePath="$PROJECT_DIR$/example/ios/Podfile" afterPath="$PROJECT_DIR$/example/ios/Podfile" />
|
||||||
<change beforePath="$PROJECT_DIR$/android/src/main/res/menu/menu_main.xml" afterPath="$PROJECT_DIR$/android/src/main/res/menu/menu_main.xml" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/example/lib/main.dart" afterPath="$PROJECT_DIR$/example/lib/main.dart" />
|
<change beforePath="$PROJECT_DIR$/example/lib/main.dart" afterPath="$PROJECT_DIR$/example/lib/main.dart" />
|
||||||
<change beforePath="$PROJECT_DIR$/ios/Classes/InAppBrowserOptions.swift" afterPath="$PROJECT_DIR$/ios/Classes/InAppBrowserOptions.swift" />
|
<change beforePath="$PROJECT_DIR$/flutter_inappbrowser.iml" afterPath="$PROJECT_DIR$/flutter_inappbrowser.iml" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/ios/Classes/InAppBrowser.h" afterPath="$PROJECT_DIR$/ios/Classes/InAppBrowserFlutterPlugin.h" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/ios/Classes/InAppBrowser.m" afterPath="$PROJECT_DIR$/ios/Classes/InAppBrowserFlutterPlugin.m" />
|
||||||
<change beforePath="$PROJECT_DIR$/ios/Classes/InAppBrowserWebViewController.swift" afterPath="$PROJECT_DIR$/ios/Classes/InAppBrowserWebViewController.swift" />
|
<change beforePath="$PROJECT_DIR$/ios/Classes/InAppBrowserWebViewController.swift" afterPath="$PROJECT_DIR$/ios/Classes/InAppBrowserWebViewController.swift" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/ios/Classes/SwiftFlutterPlugin.swift" afterPath="$PROJECT_DIR$/ios/Classes/SwiftFlutterPlugin.swift" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/lib/flutter_inappbrowser.dart" afterPath="$PROJECT_DIR$/lib/flutter_inappbrowser.dart" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/pubspec.yaml" afterPath="$PROJECT_DIR$/pubspec.yaml" />
|
||||||
</list>
|
</list>
|
||||||
<ignored path="$PROJECT_DIR$/.dart_tool/" />
|
<ignored path="$PROJECT_DIR$/.dart_tool/" />
|
||||||
<ignored path="$PROJECT_DIR$/.idea/" />
|
<ignored path="$PROJECT_DIR$/.idea/" />
|
||||||
|
@ -39,8 +45,8 @@
|
||||||
<file leaf-file-name="flutter_inappbrowser.dart" pinned="false" current-in-tab="false">
|
<file leaf-file-name="flutter_inappbrowser.dart" pinned="false" current-in-tab="false">
|
||||||
<entry file="file://$PROJECT_DIR$/lib/flutter_inappbrowser.dart">
|
<entry file="file://$PROJECT_DIR$/lib/flutter_inappbrowser.dart">
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
<state relative-caret-position="1725">
|
<state relative-caret-position="513">
|
||||||
<caret line="136" column="29" lean-forward="false" selection-start-line="136" selection-start-column="29" selection-end-line="136" selection-end-column="29" />
|
<caret line="198" column="52" lean-forward="false" selection-start-line="198" selection-start-column="52" selection-end-line="198" selection-end-column="52" />
|
||||||
<folding>
|
<folding>
|
||||||
<element signature="e#814#834#0" expanded="true" />
|
<element signature="e#814#834#0" expanded="true" />
|
||||||
</folding>
|
</folding>
|
||||||
|
@ -51,8 +57,8 @@
|
||||||
<file leaf-file-name="main.dart" pinned="false" current-in-tab="true">
|
<file leaf-file-name="main.dart" pinned="false" current-in-tab="true">
|
||||||
<entry file="file://$PROJECT_DIR$/example/lib/main.dart">
|
<entry file="file://$PROJECT_DIR$/example/lib/main.dart">
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
<state relative-caret-position="212">
|
<state relative-caret-position="495">
|
||||||
<caret line="43" column="51" lean-forward="false" selection-start-line="43" selection-start-column="51" selection-end-line="43" selection-end-column="51" />
|
<caret line="35" column="0" lean-forward="false" selection-start-line="35" selection-start-column="0" selection-end-line="35" selection-end-column="0" />
|
||||||
<folding />
|
<folding />
|
||||||
</state>
|
</state>
|
||||||
</provider>
|
</provider>
|
||||||
|
@ -69,7 +75,6 @@
|
||||||
</component>
|
</component>
|
||||||
<component name="FindInProjectRecents">
|
<component name="FindInProjectRecents">
|
||||||
<findStrings>
|
<findStrings>
|
||||||
<find>Resource</find>
|
|
||||||
<find>(0)</find>
|
<find>(0)</find>
|
||||||
<find>closeDi</find>
|
<find>closeDi</find>
|
||||||
<find>hide()</find>
|
<find>hide()</find>
|
||||||
|
@ -99,6 +104,7 @@
|
||||||
<find>injectDeferredObject</find>
|
<find>injectDeferredObject</find>
|
||||||
<find>sourceFile</find>
|
<find>sourceFile</find>
|
||||||
<find>hideUrlBar</find>
|
<find>hideUrlBar</find>
|
||||||
|
<find>InAppBrowser</find>
|
||||||
</findStrings>
|
</findStrings>
|
||||||
<replaceStrings>
|
<replaceStrings>
|
||||||
<replace>activity.getPreferences(0)</replace>
|
<replace>activity.getPreferences(0)</replace>
|
||||||
|
@ -122,13 +128,11 @@
|
||||||
<option value="$PROJECT_DIR$/android/src/main/AndroidManifest.xml" />
|
<option value="$PROJECT_DIR$/android/src/main/AndroidManifest.xml" />
|
||||||
<option value="$PROJECT_DIR$/android/src/main/java/com/pichillilorenzo/flutterwebview/FlutterWebviewPlugin.java" />
|
<option value="$PROJECT_DIR$/android/src/main/java/com/pichillilorenzo/flutterwebview/FlutterWebviewPlugin.java" />
|
||||||
<option value="$PROJECT_DIR$/lib/flutter_webview.dart" />
|
<option value="$PROJECT_DIR$/lib/flutter_webview.dart" />
|
||||||
<option value="$PROJECT_DIR$/example/ios/Podfile" />
|
|
||||||
<option value="$PROJECT_DIR$/example/ios/Flutter/Debug.xcconfig" />
|
<option value="$PROJECT_DIR$/example/ios/Flutter/Debug.xcconfig" />
|
||||||
<option value="$PROJECT_DIR$/android/src/main/java/com/pichillilorenzo/flutterwebview/InAppBrowser.java" />
|
<option value="$PROJECT_DIR$/android/src/main/java/com/pichillilorenzo/flutterwebview/InAppBrowser.java" />
|
||||||
<option value="$PROJECT_DIR$/android/src/main/java/com/pichillilorenzo/flutterwebview/InAppBrowserClient.java" />
|
<option value="$PROJECT_DIR$/android/src/main/java/com/pichillilorenzo/flutterwebview/InAppBrowserClient.java" />
|
||||||
<option value="$PROJECT_DIR$/android/src/main/java/com/pichillilorenzo/flutterwebview/InAppBrowserDialog.java" />
|
<option value="$PROJECT_DIR$/android/src/main/java/com/pichillilorenzo/flutterwebview/InAppBrowserDialog.java" />
|
||||||
<option value="$PROJECT_DIR$/android/settings.gradle" />
|
<option value="$PROJECT_DIR$/android/settings.gradle" />
|
||||||
<option value="$PROJECT_DIR$/ios/flutter_inappbrowser.podspec" />
|
|
||||||
<option value="$PROJECT_DIR$/example/pubspec.yaml" />
|
<option value="$PROJECT_DIR$/example/pubspec.yaml" />
|
||||||
<option value="$PROJECT_DIR$/ios/Classes/InAppBrowser.m" />
|
<option value="$PROJECT_DIR$/ios/Classes/InAppBrowser.m" />
|
||||||
<option value="$PROJECT_DIR$/ios/Classes/SwiftFlutterPlugin.swift" />
|
<option value="$PROJECT_DIR$/ios/Classes/SwiftFlutterPlugin.swift" />
|
||||||
|
@ -136,19 +140,21 @@
|
||||||
<option value="$PROJECT_DIR$/LICENSE" />
|
<option value="$PROJECT_DIR$/LICENSE" />
|
||||||
<option value="$PROJECT_DIR$/android/src/main/java/com/pichillilorenzo/flutter_inappbrowser/InAppBrowserDialog.java" />
|
<option value="$PROJECT_DIR$/android/src/main/java/com/pichillilorenzo/flutter_inappbrowser/InAppBrowserDialog.java" />
|
||||||
<option value="$PROJECT_DIR$/android/src/main/java/com/pichillilorenzo/flutter_inappbrowser/InAppBrowserClient.java" />
|
<option value="$PROJECT_DIR$/android/src/main/java/com/pichillilorenzo/flutter_inappbrowser/InAppBrowserClient.java" />
|
||||||
<option value="$PROJECT_DIR$/pubspec.yaml" />
|
|
||||||
<option value="$PROJECT_DIR$/README.md" />
|
<option value="$PROJECT_DIR$/README.md" />
|
||||||
<option value="$PROJECT_DIR$/android/build.gradle" />
|
|
||||||
<option value="$PROJECT_DIR$/android/src/main/java/com/pichillilorenzo/flutter_inappbrowser/InAppBrowser.java" />
|
<option value="$PROJECT_DIR$/android/src/main/java/com/pichillilorenzo/flutter_inappbrowser/InAppBrowser.java" />
|
||||||
|
<option value="$PROJECT_DIR$/example/ios/Podfile" />
|
||||||
|
<option value="$PROJECT_DIR$/ios/flutter_inappbrowser.podspec" />
|
||||||
<option value="$PROJECT_DIR$/lib/flutter_inappbrowser.dart" />
|
<option value="$PROJECT_DIR$/lib/flutter_inappbrowser.dart" />
|
||||||
|
<option value="$PROJECT_DIR$/android/build.gradle" />
|
||||||
|
<option value="$PROJECT_DIR$/pubspec.yaml" />
|
||||||
<option value="$PROJECT_DIR$/example/lib/main.dart" />
|
<option value="$PROJECT_DIR$/example/lib/main.dart" />
|
||||||
</list>
|
</list>
|
||||||
</option>
|
</option>
|
||||||
</component>
|
</component>
|
||||||
<component name="ProjectFrameBounds">
|
<component name="ProjectFrameBounds">
|
||||||
<option name="x" value="362" />
|
<option name="x" value="288" />
|
||||||
<option name="y" value="23" />
|
<option name="y" value="23" />
|
||||||
<option name="width" value="1554" />
|
<option name="width" value="1632" />
|
||||||
<option name="height" value="1057" />
|
<option name="height" value="1057" />
|
||||||
</component>
|
</component>
|
||||||
<component name="ProjectLevelVcsManager" settingsEditedManually="true" />
|
<component name="ProjectLevelVcsManager" settingsEditedManually="true" />
|
||||||
|
@ -167,6 +173,9 @@
|
||||||
<foldersAlwaysOnTop value="true" />
|
<foldersAlwaysOnTop value="true" />
|
||||||
</navigator>
|
</navigator>
|
||||||
<panes>
|
<panes>
|
||||||
|
<pane id="Scope" />
|
||||||
|
<pane id="Scratches" />
|
||||||
|
<pane id="AndroidView" />
|
||||||
<pane id="ProjectPane">
|
<pane id="ProjectPane">
|
||||||
<subPane>
|
<subPane>
|
||||||
<expand>
|
<expand>
|
||||||
|
@ -177,29 +186,39 @@
|
||||||
<path>
|
<path>
|
||||||
<item name="flutter_inappbrowser" type="b2602c69:ProjectViewProjectNode" />
|
<item name="flutter_inappbrowser" type="b2602c69:ProjectViewProjectNode" />
|
||||||
<item name="flutter_inappbrowser" type="462c0819:PsiDirectoryNode" />
|
<item name="flutter_inappbrowser" type="462c0819:PsiDirectoryNode" />
|
||||||
<item name="example" type="462c0819:PsiDirectoryNode" />
|
|
||||||
</path>
|
|
||||||
<path>
|
|
||||||
<item name="flutter_inappbrowser" type="b2602c69:ProjectViewProjectNode" />
|
|
||||||
<item name="flutter_inappbrowser" type="462c0819:PsiDirectoryNode" />
|
|
||||||
<item name="example" type="462c0819:PsiDirectoryNode" />
|
|
||||||
<item name="android" type="462c0819:PsiDirectoryNode" />
|
<item name="android" type="462c0819:PsiDirectoryNode" />
|
||||||
</path>
|
</path>
|
||||||
<path>
|
<path>
|
||||||
<item name="flutter_inappbrowser" type="b2602c69:ProjectViewProjectNode" />
|
<item name="flutter_inappbrowser" type="b2602c69:ProjectViewProjectNode" />
|
||||||
<item name="flutter_inappbrowser" type="462c0819:PsiDirectoryNode" />
|
<item name="flutter_inappbrowser" type="462c0819:PsiDirectoryNode" />
|
||||||
<item name="example" type="462c0819:PsiDirectoryNode" />
|
|
||||||
<item name="android" type="462c0819:PsiDirectoryNode" />
|
<item name="android" type="462c0819:PsiDirectoryNode" />
|
||||||
<item name="app" type="462c0819:PsiDirectoryNode" />
|
|
||||||
</path>
|
|
||||||
<path>
|
|
||||||
<item name="flutter_inappbrowser" type="b2602c69:ProjectViewProjectNode" />
|
|
||||||
<item name="flutter_inappbrowser" type="462c0819:PsiDirectoryNode" />
|
|
||||||
<item name="example" type="462c0819:PsiDirectoryNode" />
|
|
||||||
<item name="android" type="462c0819:PsiDirectoryNode" />
|
|
||||||
<item name="app" type="462c0819:PsiDirectoryNode" />
|
|
||||||
<item name="main" type="462c0819:PsiDirectoryNode" />
|
<item name="main" type="462c0819:PsiDirectoryNode" />
|
||||||
</path>
|
</path>
|
||||||
|
<path>
|
||||||
|
<item name="flutter_inappbrowser" type="b2602c69:ProjectViewProjectNode" />
|
||||||
|
<item name="flutter_inappbrowser" type="462c0819:PsiDirectoryNode" />
|
||||||
|
<item name="example" type="462c0819:PsiDirectoryNode" />
|
||||||
|
</path>
|
||||||
|
<path>
|
||||||
|
<item name="flutter_inappbrowser" type="b2602c69:ProjectViewProjectNode" />
|
||||||
|
<item name="flutter_inappbrowser" type="462c0819:PsiDirectoryNode" />
|
||||||
|
<item name="example" type="462c0819:PsiDirectoryNode" />
|
||||||
|
<item name="android" type="462c0819:PsiDirectoryNode" />
|
||||||
|
</path>
|
||||||
|
<path>
|
||||||
|
<item name="flutter_inappbrowser" type="b2602c69:ProjectViewProjectNode" />
|
||||||
|
<item name="flutter_inappbrowser" type="462c0819:PsiDirectoryNode" />
|
||||||
|
<item name="example" type="462c0819:PsiDirectoryNode" />
|
||||||
|
<item name="android" type="462c0819:PsiDirectoryNode" />
|
||||||
|
<item name="app" type="462c0819:PsiDirectoryNode" />
|
||||||
|
</path>
|
||||||
|
<path>
|
||||||
|
<item name="flutter_inappbrowser" type="b2602c69:ProjectViewProjectNode" />
|
||||||
|
<item name="flutter_inappbrowser" type="462c0819:PsiDirectoryNode" />
|
||||||
|
<item name="example" type="462c0819:PsiDirectoryNode" />
|
||||||
|
<item name="android" type="462c0819:PsiDirectoryNode" />
|
||||||
|
<item name=".gradle" type="462c0819:PsiDirectoryNode" />
|
||||||
|
</path>
|
||||||
<path>
|
<path>
|
||||||
<item name="flutter_inappbrowser" type="b2602c69:ProjectViewProjectNode" />
|
<item name="flutter_inappbrowser" type="b2602c69:ProjectViewProjectNode" />
|
||||||
<item name="flutter_inappbrowser" type="462c0819:PsiDirectoryNode" />
|
<item name="flutter_inappbrowser" type="462c0819:PsiDirectoryNode" />
|
||||||
|
@ -221,9 +240,6 @@
|
||||||
</subPane>
|
</subPane>
|
||||||
<option name="show-excluded-files" value="false" />
|
<option name="show-excluded-files" value="false" />
|
||||||
</pane>
|
</pane>
|
||||||
<pane id="Scratches" />
|
|
||||||
<pane id="AndroidView" />
|
|
||||||
<pane id="Scope" />
|
|
||||||
<pane id="PackagesPane" />
|
<pane id="PackagesPane" />
|
||||||
</panes>
|
</panes>
|
||||||
</component>
|
</component>
|
||||||
|
@ -239,6 +255,8 @@
|
||||||
<property name="Repository.Attach.JavaDocs" value="false" />
|
<property name="Repository.Attach.JavaDocs" value="false" />
|
||||||
<property name="Repository.Attach.Sources" value="false" />
|
<property name="Repository.Attach.Sources" value="false" />
|
||||||
<property name="settings.editor.selected.configurable" value="configurable.group.language" />
|
<property name="settings.editor.selected.configurable" value="configurable.group.language" />
|
||||||
|
<property name="android.project.structure.last.selected" value="SDK Location" />
|
||||||
|
<property name="android.project.structure.proportion" value="0.15" />
|
||||||
</component>
|
</component>
|
||||||
<component name="RecentsManager">
|
<component name="RecentsManager">
|
||||||
<key name="CopyFile.RECENT_KEYS">
|
<key name="CopyFile.RECENT_KEYS">
|
||||||
|
@ -412,41 +430,41 @@
|
||||||
<servers />
|
<servers />
|
||||||
</component>
|
</component>
|
||||||
<component name="ToolWindowManager">
|
<component name="ToolWindowManager">
|
||||||
<frame x="362" y="23" width="1554" height="1057" extended-state="0" />
|
<frame x="288" y="23" width="1632" height="1057" extended-state="0" />
|
||||||
<editor active="true" />
|
<editor active="true" />
|
||||||
<layout>
|
<layout>
|
||||||
<window_info id="Android Profiler" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
|
<window_info id="Android Profiler" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
|
||||||
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
|
|
||||||
<window_info id="Palette	" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
|
|
||||||
<window_info id="Image Layers" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
|
|
||||||
<window_info id="Build Variants" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
|
<window_info id="Build Variants" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
|
||||||
<window_info id="Capture Analysis" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
|
<window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.31735888" sideWeight="0.5026455" order="8" side_tool="true" content_ui="tabs" />
|
||||||
<window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.31735888" sideWeight="0.5026455" order="7" side_tool="true" content_ui="tabs" />
|
<window_info id="Dart Analysis" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.3290735" sideWeight="0.5" order="14" side_tool="false" content_ui="tabs" />
|
||||||
<window_info id="Dart Analysis" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.3290735" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
|
|
||||||
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.36208734" sideWeight="0.4973545" order="2" side_tool="false" content_ui="tabs" />
|
|
||||||
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
|
|
||||||
<window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32694355" sideWeight="0.4973545" order="7" side_tool="false" content_ui="tabs" />
|
|
||||||
<window_info id="Flutter Outline" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32936507" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
|
<window_info id="Flutter Outline" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32936507" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
|
||||||
<window_info id="Logcat" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
|
<window_info id="Logcat" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="11" side_tool="false" content_ui="tabs" />
|
||||||
<window_info id="Captures" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32936507" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
|
|
||||||
<window_info id="Capture Tool" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
|
<window_info id="Capture Tool" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
|
||||||
<window_info id="Designer" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
|
<window_info id="Designer" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
|
||||||
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.20965609" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
|
|
||||||
<window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.24969475" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
|
<window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.24969475" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
|
||||||
<window_info id="Device File Explorer" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="true" content_ui="tabs" />
|
<window_info id="Device File Explorer" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="true" content_ui="tabs" />
|
||||||
<window_info id="Theme Preview" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
|
|
||||||
<window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
|
<window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
|
||||||
|
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
|
||||||
|
<window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.31735888" sideWeight="0.5" order="12" side_tool="false" content_ui="tabs" />
|
||||||
|
<window_info id="Palette	" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
|
||||||
|
<window_info id="Image Layers" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
|
||||||
|
<window_info id="Capture Analysis" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
|
||||||
|
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.36208734" sideWeight="0.4973545" order="2" side_tool="false" content_ui="tabs" />
|
||||||
|
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="9" side_tool="false" content_ui="tabs" />
|
||||||
|
<window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.3258786" sideWeight="0.4973545" order="10" side_tool="false" content_ui="tabs" />
|
||||||
|
<window_info id="Captures" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32936507" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
|
||||||
|
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.17798743" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
|
||||||
|
<window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.3290735" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
|
||||||
|
<window_info id="Theme Preview" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
|
||||||
<window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
|
<window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
|
||||||
<window_info id="Flutter Inspector" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
|
<window_info id="Flutter Inspector" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
|
||||||
<window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
|
<window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
|
||||||
<window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
|
<window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
|
||||||
<window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
|
<window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
|
||||||
<window_info id="Dependency Viewer" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32800853" sideWeight="0.5" order="8" side_tool="false" content_ui="tabs" />
|
<window_info id="Dependency Viewer" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32800853" sideWeight="0.5" order="13" side_tool="false" content_ui="tabs" />
|
||||||
<window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
|
<window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
|
||||||
<window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
|
<window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
|
||||||
<window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.31735888" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
|
|
||||||
<window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
|
<window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
|
||||||
<window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.3290735" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
|
|
||||||
</layout>
|
</layout>
|
||||||
<layout-to-restore>
|
<layout-to-restore>
|
||||||
<window_info id="Android Profiler" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
|
<window_info id="Android Profiler" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
|
||||||
|
@ -492,20 +510,6 @@
|
||||||
<watches-manager />
|
<watches-manager />
|
||||||
</component>
|
</component>
|
||||||
<component name="editorHistoryManager">
|
<component name="editorHistoryManager">
|
||||||
<entry file="file://$PROJECT_DIR$/example/flutter_webview_example.iml">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="0">
|
|
||||||
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
<entry file="file://$PROJECT_DIR$/lib/flutter_inappbrowser.dart">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="0">
|
|
||||||
<caret line="29" column="0" lean-forward="false" selection-start-line="27" selection-start-column="0" selection-end-line="29" selection-end-column="0" />
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
<entry file="file://$PROJECT_DIR$/example/android/app/src/main/AndroidManifest.xml">
|
<entry file="file://$PROJECT_DIR$/example/android/app/src/main/AndroidManifest.xml">
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
<state relative-caret-position="105">
|
<state relative-caret-position="105">
|
||||||
|
@ -542,7 +546,7 @@
|
||||||
</state>
|
</state>
|
||||||
</provider>
|
</provider>
|
||||||
</entry>
|
</entry>
|
||||||
<entry file="file://$PROJECT_DIR$/android/src/main/java/com/pichillilorenzo/flutter_inappbrowser/InAppBrowser.java">
|
<entry file="file://$PROJECT_DIR$/android/src/main/java/com/pichillilorenzo/flutter_inappbrowser/InAppBrowserFlutterPlugin.java">
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
<state relative-caret-position="258">
|
<state relative-caret-position="258">
|
||||||
<caret line="65" column="18" lean-forward="false" selection-start-line="65" selection-start-column="18" selection-end-line="65" selection-end-column="18" />
|
<caret line="65" column="18" lean-forward="false" selection-start-line="65" selection-start-column="18" selection-end-line="65" selection-end-column="18" />
|
||||||
|
@ -550,7 +554,7 @@
|
||||||
</state>
|
</state>
|
||||||
</provider>
|
</provider>
|
||||||
</entry>
|
</entry>
|
||||||
<entry file="file://$PROJECT_DIR$/android/src/main/java/com/pichillilorenzo/flutter_inappbrowser/InAppBrowser.java">
|
<entry file="file://$PROJECT_DIR$/android/src/main/java/com/pichillilorenzo/flutter_inappbrowser/InAppBrowserFlutterPlugin.java">
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
<state relative-caret-position="105">
|
<state relative-caret-position="105">
|
||||||
<caret line="74" column="13" lean-forward="false" selection-start-line="74" selection-start-column="13" selection-end-line="74" selection-end-column="13" />
|
<caret line="74" column="13" lean-forward="false" selection-start-line="74" selection-start-column="13" selection-end-line="74" selection-end-column="13" />
|
||||||
|
@ -630,13 +634,6 @@
|
||||||
</state>
|
</state>
|
||||||
</provider>
|
</provider>
|
||||||
</entry>
|
</entry>
|
||||||
<entry file="file://$PROJECT_DIR$/example/ios/Podfile">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="320">
|
|
||||||
<caret line="56" column="3" lean-forward="false" selection-start-line="56" selection-start-column="3" selection-end-line="56" selection-end-column="3" />
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
<entry file="file://$PROJECT_DIR$/android/local.properties">
|
<entry file="file://$PROJECT_DIR$/android/local.properties">
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
<state relative-caret-position="0">
|
<state relative-caret-position="0">
|
||||||
|
@ -658,27 +655,6 @@
|
||||||
</state>
|
</state>
|
||||||
</provider>
|
</provider>
|
||||||
</entry>
|
</entry>
|
||||||
<entry file="file://$PROJECT_DIR$/example/android/settings.gradle">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="0">
|
|
||||||
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
<entry file="file://$PROJECT_DIR$/example/android/local.properties">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="0">
|
|
||||||
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
<entry file="file://$PROJECT_DIR$/example/android/build.gradle">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="0">
|
|
||||||
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
<entry file="file://$PROJECT_DIR$/example/android/gradle.properties">
|
<entry file="file://$PROJECT_DIR$/example/android/gradle.properties">
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
<state relative-caret-position="0">
|
<state relative-caret-position="0">
|
||||||
|
@ -693,13 +669,6 @@
|
||||||
</state>
|
</state>
|
||||||
</provider>
|
</provider>
|
||||||
</entry>
|
</entry>
|
||||||
<entry file="file://$PROJECT_DIR$/ios/flutter_inappbrowser.podspec">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="270">
|
|
||||||
<caret line="18" column="33" lean-forward="false" selection-start-line="18" selection-start-column="33" selection-end-line="18" selection-end-column="33" />
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
<entry file="file://$PROJECT_DIR$/ios/Classes/InAppBrowser.h">
|
<entry file="file://$PROJECT_DIR$/ios/Classes/InAppBrowser.h">
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
<state relative-caret-position="0">
|
<state relative-caret-position="0">
|
||||||
|
@ -714,13 +683,6 @@
|
||||||
</state>
|
</state>
|
||||||
</provider>
|
</provider>
|
||||||
</entry>
|
</entry>
|
||||||
<entry file="file://$PROJECT_DIR$/flutter_inappbrowser.iml">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="0">
|
|
||||||
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="38" />
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
<entry file="file://$PROJECT_DIR$/CHANGELOG.md">
|
<entry file="file://$PROJECT_DIR$/CHANGELOG.md">
|
||||||
<provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
|
<provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
|
||||||
<state split_layout="SPLIT">
|
<state split_layout="SPLIT">
|
||||||
|
@ -738,20 +700,6 @@
|
||||||
</state>
|
</state>
|
||||||
</provider>
|
</provider>
|
||||||
</entry>
|
</entry>
|
||||||
<entry file="file://$PROJECT_DIR$/ios/Classes/SwiftFlutterPlugin.swift">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="1965">
|
|
||||||
<caret line="131" column="5" lean-forward="true" selection-start-line="131" selection-start-column="5" selection-end-line="131" selection-end-column="5" />
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
<entry file="file://$PROJECT_DIR$/pubspec.yaml">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="15">
|
|
||||||
<caret line="1" column="133" lean-forward="false" selection-start-line="1" selection-start-column="13" selection-end-line="1" selection-end-column="133" />
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
<entry file="file://$PROJECT_DIR$/android/src/main/AndroidManifest.xml">
|
<entry file="file://$PROJECT_DIR$/android/src/main/AndroidManifest.xml">
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
<state relative-caret-position="90">
|
<state relative-caret-position="90">
|
||||||
|
@ -771,20 +719,6 @@
|
||||||
</state>
|
</state>
|
||||||
</provider>
|
</provider>
|
||||||
</entry>
|
</entry>
|
||||||
<entry file="file://$PROJECT_DIR$/android/build.gradle">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="495">
|
|
||||||
<caret line="33" column="1" lean-forward="false" selection-start-line="33" selection-start-column="1" selection-end-line="33" selection-end-column="1" />
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
<entry file="file://$PROJECT_DIR$/flutter_inappbrowser_android.iml">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="435">
|
|
||||||
<caret line="29" column="9" lean-forward="false" selection-start-line="29" selection-start-column="9" selection-end-line="29" selection-end-column="9" />
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
<entry file="file://$PROJECT_DIR$/example/ios/Flutter/Release.xcconfig">
|
<entry file="file://$PROJECT_DIR$/example/ios/Flutter/Release.xcconfig">
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
<state relative-caret-position="0">
|
<state relative-caret-position="0">
|
||||||
|
@ -799,7 +733,7 @@
|
||||||
</state>
|
</state>
|
||||||
</provider>
|
</provider>
|
||||||
</entry>
|
</entry>
|
||||||
<entry file="file://$PROJECT_DIR$/android/src/main/java/com/pichillilorenzo/flutter_inappbrowser/InAppBrowser.java">
|
<entry file="file://$PROJECT_DIR$/android/src/main/java/com/pichillilorenzo/flutter_inappbrowser/InAppBrowserFlutterPlugin.java">
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
<state relative-caret-position="15">
|
<state relative-caret-position="15">
|
||||||
<caret line="157" column="0" lean-forward="false" selection-start-line="157" selection-start-column="0" selection-end-line="157" selection-end-column="0" />
|
<caret line="157" column="0" lean-forward="false" selection-start-line="157" selection-start-column="0" selection-end-line="157" selection-end-column="0" />
|
||||||
|
@ -815,10 +749,106 @@
|
||||||
</state>
|
</state>
|
||||||
</provider>
|
</provider>
|
||||||
</entry>
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/ios/Classes/InAppBrowserWebViewController.swift">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="180">
|
||||||
|
<caret line="12" column="0" lean-forward="false" selection-start-line="12" selection-start-column="0" selection-end-line="12" selection-end-column="0" />
|
||||||
|
<folding />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/example/ios/Podfile">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="328">
|
||||||
|
<caret line="56" column="0" lean-forward="false" selection-start-line="56" selection-start-column="0" selection-end-line="56" selection-end-column="0" />
|
||||||
|
<folding />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/ios/flutter_inappbrowser.podspec">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="240">
|
||||||
|
<caret line="16" column="24" lean-forward="false" selection-start-line="16" selection-start-column="24" selection-end-line="16" selection-end-column="24" />
|
||||||
|
<folding />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/ios/Classes/SwiftFlutterPlugin.swift">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="191">
|
||||||
|
<caret line="107" column="9" lean-forward="false" selection-start-line="107" selection-start-column="9" selection-end-line="107" selection-end-column="9" />
|
||||||
|
<folding />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/flutter_inappbrowser.iml">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="0">
|
||||||
|
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="38" />
|
||||||
|
<folding />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/example/android/build.gradle">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="0">
|
||||||
|
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
|
||||||
|
<folding />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/flutter_inappbrowser_android.iml">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="435">
|
||||||
|
<caret line="29" column="9" lean-forward="false" selection-start-line="29" selection-start-column="9" selection-end-line="29" selection-end-column="9" />
|
||||||
|
<folding />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/example/android/settings.gradle">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="0">
|
||||||
|
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
|
||||||
|
<folding />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/example/android/local.properties">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="0">
|
||||||
|
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
|
||||||
|
<folding />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/example/android/app/build.gradle">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="-27">
|
||||||
|
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
|
||||||
|
<folding />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/pubspec.yaml">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="115">
|
||||||
|
<caret line="8" column="0" lean-forward="false" selection-start-line="8" selection-start-column="0" selection-end-line="8" selection-end-column="0" />
|
||||||
|
<folding />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/android/build.gradle">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="585">
|
||||||
|
<caret line="39" column="60" lean-forward="false" selection-start-line="39" selection-start-column="60" selection-end-line="39" selection-end-column="60" />
|
||||||
|
<folding />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
<entry file="file://$PROJECT_DIR$/lib/flutter_inappbrowser.dart">
|
<entry file="file://$PROJECT_DIR$/lib/flutter_inappbrowser.dart">
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
<state relative-caret-position="1725">
|
<state relative-caret-position="513">
|
||||||
<caret line="136" column="29" lean-forward="false" selection-start-line="136" selection-start-column="29" selection-end-line="136" selection-end-column="29" />
|
<caret line="198" column="52" lean-forward="false" selection-start-line="198" selection-start-column="52" selection-end-line="198" selection-end-column="52" />
|
||||||
<folding>
|
<folding>
|
||||||
<element signature="e#814#834#0" expanded="true" />
|
<element signature="e#814#834#0" expanded="true" />
|
||||||
</folding>
|
</folding>
|
||||||
|
@ -827,8 +857,8 @@
|
||||||
</entry>
|
</entry>
|
||||||
<entry file="file://$PROJECT_DIR$/example/lib/main.dart">
|
<entry file="file://$PROJECT_DIR$/example/lib/main.dart">
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
<state relative-caret-position="212">
|
<state relative-caret-position="495">
|
||||||
<caret line="43" column="51" lean-forward="false" selection-start-line="43" selection-start-column="51" selection-end-line="43" selection-end-column="51" />
|
<caret line="35" column="0" lean-forward="false" selection-start-line="35" selection-start-column="0" selection-end-line="35" selection-end-column="0" />
|
||||||
<folding />
|
<folding />
|
||||||
</state>
|
</state>
|
||||||
</provider>
|
</provider>
|
||||||
|
|
|
@ -38,5 +38,4 @@ android {
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation 'com.android.support:customtabs:27.1.1'
|
implementation 'com.android.support:customtabs:27.1.1'
|
||||||
implementation 'com.android.support:appcompat-v7:27.1.1'
|
implementation 'com.android.support:appcompat-v7:27.1.1'
|
||||||
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
package="com.pichillilorenzo.flutter_inappbrowser">
|
package="com.pichillilorenzo.flutter_inappbrowser">
|
||||||
|
|
||||||
<uses-permission android:name="android.permission.INTERNET" />
|
<uses-permission android:name="android.permission.INTERNET" />
|
||||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
|
||||||
|
|
||||||
<application
|
<application
|
||||||
android:theme="@style/AppTheme" >
|
android:theme="@style/AppTheme" >
|
||||||
|
|
|
@ -30,13 +30,16 @@ import android.net.Uri;
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.support.annotation.RequiresApi;
|
import android.support.annotation.RequiresApi;
|
||||||
|
import android.util.JsonReader;
|
||||||
|
import android.util.JsonToken;
|
||||||
import android.webkit.MimeTypeMap;
|
import android.webkit.MimeTypeMap;
|
||||||
|
import android.webkit.ValueCallback;
|
||||||
import android.webkit.WebView;
|
import android.webkit.WebView;
|
||||||
import android.webkit.WebViewClient;
|
import android.webkit.WebViewClient;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.widget.Toast;
|
|
||||||
|
|
||||||
import java.time.Duration;
|
import java.io.IOException;
|
||||||
|
import java.io.StringReader;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
@ -44,11 +47,10 @@ import io.flutter.plugin.common.MethodCall;
|
||||||
import io.flutter.plugin.common.MethodChannel;
|
import io.flutter.plugin.common.MethodChannel;
|
||||||
import io.flutter.plugin.common.MethodChannel.MethodCallHandler;
|
import io.flutter.plugin.common.MethodChannel.MethodCallHandler;
|
||||||
import io.flutter.plugin.common.MethodChannel.Result;
|
import io.flutter.plugin.common.MethodChannel.Result;
|
||||||
import io.flutter.plugin.common.PluginRegistry;
|
|
||||||
import io.flutter.plugin.common.PluginRegistry.Registrar;
|
import io.flutter.plugin.common.PluginRegistry.Registrar;
|
||||||
|
|
||||||
/** InAppBrowser */
|
/** InAppBrowserFlutterPlugin */
|
||||||
public class InAppBrowser implements MethodCallHandler {
|
public class InAppBrowserFlutterPlugin implements MethodCallHandler {
|
||||||
|
|
||||||
public static Registrar registrar;
|
public static Registrar registrar;
|
||||||
public Activity activity;
|
public Activity activity;
|
||||||
|
@ -56,10 +58,10 @@ public class InAppBrowser implements MethodCallHandler {
|
||||||
public static WebViewActivity webViewActivity;
|
public static WebViewActivity webViewActivity;
|
||||||
|
|
||||||
private static final String NULL = "null";
|
private static final String NULL = "null";
|
||||||
protected static final String LOG_TAG = "InAppBrowser";
|
protected static final String LOG_TAG = "InAppBrowserFlutterP";
|
||||||
|
|
||||||
|
|
||||||
public InAppBrowser(Registrar r, Activity activity) {
|
public InAppBrowserFlutterPlugin(Registrar r, Activity activity) {
|
||||||
registrar = r;
|
registrar = r;
|
||||||
this.activity = activity;
|
this.activity = activity;
|
||||||
channel = new MethodChannel(registrar.messenger(), "com.pichillilorenzo/flutter_inappbrowser");
|
channel = new MethodChannel(registrar.messenger(), "com.pichillilorenzo/flutter_inappbrowser");
|
||||||
|
@ -68,7 +70,7 @@ public class InAppBrowser implements MethodCallHandler {
|
||||||
/** Plugin registration. */
|
/** Plugin registration. */
|
||||||
public static void registerWith(Registrar registrar) {
|
public static void registerWith(Registrar registrar) {
|
||||||
final MethodChannel channel = new MethodChannel(registrar.messenger(), "com.pichillilorenzo/flutter_inappbrowser");
|
final MethodChannel channel = new MethodChannel(registrar.messenger(), "com.pichillilorenzo/flutter_inappbrowser");
|
||||||
channel.setMethodCallHandler(new InAppBrowser(registrar, registrar.activity()));
|
channel.setMethodCallHandler(new InAppBrowserFlutterPlugin(registrar, registrar.activity()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@RequiresApi(api = Build.VERSION_CODES.KITKAT)
|
@RequiresApi(api = Build.VERSION_CODES.KITKAT)
|
||||||
|
@ -111,9 +113,9 @@ public class InAppBrowser implements MethodCallHandler {
|
||||||
Log.e(LOG_TAG, "Error dialing " + url + ": " + e.toString());
|
Log.e(LOG_TAG, "Error dialing " + url + ": " + e.toString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// load in InAppBrowser
|
// load in InAppBrowserFlutterPlugin
|
||||||
else {
|
else {
|
||||||
Log.d(LOG_TAG, "loading in InAppBrowser");
|
Log.d(LOG_TAG, "loading in InAppBrowserFlutterPlugin");
|
||||||
open(url, options);
|
open(url, options);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -141,26 +143,25 @@ public class InAppBrowser implements MethodCallHandler {
|
||||||
break;
|
break;
|
||||||
case "injectScriptCode":
|
case "injectScriptCode":
|
||||||
source = call.argument("source").toString();
|
source = call.argument("source").toString();
|
||||||
jsWrapper = "(function(){JSON.stringify([eval(%s)])})()";
|
jsWrapper = "(function(){return JSON.stringify(eval(%s));})();";
|
||||||
injectDeferredObject(source, jsWrapper);
|
injectDeferredObject(source, jsWrapper, result);
|
||||||
result.success(true);
|
|
||||||
break;
|
break;
|
||||||
case "injectScriptFile":
|
case "injectScriptFile":
|
||||||
urlFile = call.argument("urlFile").toString();
|
urlFile = call.argument("urlFile").toString();
|
||||||
jsWrapper = "(function(d) { var c = d.createElement('script'); c.src = %s; d.body.appendChild(c); })(document)";
|
jsWrapper = "(function(d) { var c = d.createElement('script'); c.src = %s; d.body.appendChild(c); })(document);";
|
||||||
injectDeferredObject(urlFile, jsWrapper);
|
injectDeferredObject(urlFile, jsWrapper, null);
|
||||||
result.success(true);
|
result.success(true);
|
||||||
break;
|
break;
|
||||||
case "injectStyleCode":
|
case "injectStyleCode":
|
||||||
source = call.argument("source").toString();
|
source = call.argument("source").toString();
|
||||||
jsWrapper = "(function(d) { var c = d.createElement('style'); c.innerHTML = %s; d.body.appendChild(c); })(document)";
|
jsWrapper = "(function(d) { var c = d.createElement('style'); c.innerHTML = %s; d.body.appendChild(c); })(document);";
|
||||||
injectDeferredObject(source, jsWrapper);
|
injectDeferredObject(source, jsWrapper, null);
|
||||||
result.success(true);
|
result.success(true);
|
||||||
break;
|
break;
|
||||||
case "injectStyleFile":
|
case "injectStyleFile":
|
||||||
urlFile = call.argument("urlFile").toString();
|
urlFile = call.argument("urlFile").toString();
|
||||||
jsWrapper = "(function(d) { var c = d.createElement('link'); c.rel='stylesheet'; c.type='text/css'; c.href = %s; d.head.appendChild(c); })(document)";
|
jsWrapper = "(function(d) { var c = d.createElement('link'); c.rel='stylesheet'; c.type='text/css'; c.href = %s; d.head.appendChild(c); })(document);";
|
||||||
injectDeferredObject(urlFile, jsWrapper);
|
injectDeferredObject(urlFile, jsWrapper, null);
|
||||||
result.success(true);
|
result.success(true);
|
||||||
break;
|
break;
|
||||||
case "show":
|
case "show":
|
||||||
|
@ -203,7 +204,7 @@ public class InAppBrowser implements MethodCallHandler {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Inject an object (script or style) into the InAppBrowser WebView.
|
* Inject an object (script or style) into the InAppBrowserFlutterPlugin WebView.
|
||||||
*
|
*
|
||||||
* This is a helper method for the inject{Script|Style}{Code|File} API calls, which
|
* This is a helper method for the inject{Script|Style}{Code|File} API calls, which
|
||||||
* provides a consistent method for injecting JavaScript code into the document.
|
* provides a consistent method for injecting JavaScript code into the document.
|
||||||
|
@ -211,14 +212,13 @@ public class InAppBrowser implements MethodCallHandler {
|
||||||
* If a wrapper string is supplied, then the source string will be JSON-encoded (adding
|
* If a wrapper string is supplied, then the source string will be JSON-encoded (adding
|
||||||
* quotes) and wrapped using string formatting. (The wrapper string should have a single
|
* quotes) and wrapped using string formatting. (The wrapper string should have a single
|
||||||
* '%s' marker)
|
* '%s' marker)
|
||||||
*
|
|
||||||
* @param source The source object (filename or script/style text) to inject into
|
* @param source The source object (filename or script/style text) to inject into
|
||||||
* the document.
|
* the document.
|
||||||
* @param jsWrapper A JavaScript string to wrap the source string in, so that the object
|
* @param jsWrapper A JavaScript string to wrap the source string in, so that the object
|
||||||
* is properly injected, or null if the source string is JavaScript text
|
* is properly injected, or null if the source string is JavaScript text
|
||||||
* which should be executed directly.
|
* @param result
|
||||||
*/
|
*/
|
||||||
private void injectDeferredObject(String source, String jsWrapper) {
|
private void injectDeferredObject(String source, String jsWrapper, final Result result) {
|
||||||
if (webViewActivity != null) {
|
if (webViewActivity != null) {
|
||||||
String scriptToInject;
|
String scriptToInject;
|
||||||
if (jsWrapper != null) {
|
if (jsWrapper != null) {
|
||||||
|
@ -232,14 +232,46 @@ public class InAppBrowser implements MethodCallHandler {
|
||||||
}
|
}
|
||||||
final String finalScriptToInject = scriptToInject;
|
final String finalScriptToInject = scriptToInject;
|
||||||
activity.runOnUiThread(new Runnable() {
|
activity.runOnUiThread(new Runnable() {
|
||||||
@SuppressLint("NewApi")
|
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.KITKAT) {
|
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.KITKAT) {
|
||||||
// This action will have the side-effect of blurring the currently focused element
|
// This action will have the side-effect of blurring the currently focused element
|
||||||
webViewActivity.webView.loadUrl("javascript:" + finalScriptToInject);
|
webViewActivity.webView.loadUrl("javascript:" + finalScriptToInject);
|
||||||
} else {
|
} else {
|
||||||
webViewActivity.webView.evaluateJavascript(finalScriptToInject, null);
|
webViewActivity.webView.evaluateJavascript(finalScriptToInject, new ValueCallback<String>() {
|
||||||
|
@Override
|
||||||
|
public void onReceiveValue(String s) {
|
||||||
|
if (result == null)
|
||||||
|
return;
|
||||||
|
|
||||||
|
JsonReader reader = new JsonReader(new StringReader(s));
|
||||||
|
|
||||||
|
// Must set lenient to parse single values
|
||||||
|
reader.setLenient(true);
|
||||||
|
|
||||||
|
try {
|
||||||
|
String msg;
|
||||||
|
msg = reader.nextString();
|
||||||
|
|
||||||
|
JsonReader reader2 = new JsonReader(new StringReader(msg));
|
||||||
|
reader2.setLenient(true);
|
||||||
|
|
||||||
|
if (reader2.peek() == JsonToken.STRING)
|
||||||
|
msg = reader2.nextString();
|
||||||
|
|
||||||
|
result.success(msg);
|
||||||
|
|
||||||
|
} catch (IOException e) {
|
||||||
|
Log.e(LOG_TAG, "IOException", e);
|
||||||
|
} finally {
|
||||||
|
try {
|
||||||
|
reader.close();
|
||||||
|
} catch (IOException e) {
|
||||||
|
// NOOP
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -279,7 +311,7 @@ public class InAppBrowser implements MethodCallHandler {
|
||||||
activity.startActivity(intent);
|
activity.startActivity(intent);
|
||||||
// not catching FileUriExposedException explicitly because buildtools<24 doesn't know about it
|
// not catching FileUriExposedException explicitly because buildtools<24 doesn't know about it
|
||||||
} catch (java.lang.RuntimeException e) {
|
} catch (java.lang.RuntimeException e) {
|
||||||
Log.d(LOG_TAG, "InAppBrowser: Error loading url "+url+":"+ e.toString());
|
Log.d(LOG_TAG, "InAppBrowserFlutterPlugin: Error loading url "+url+":"+ e.toString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -104,7 +104,7 @@ public class InAppBrowserWebViewClient extends WebViewClient {
|
||||||
|
|
||||||
Map<String, Object> obj = new HashMap<>();
|
Map<String, Object> obj = new HashMap<>();
|
||||||
obj.put("url", url);
|
obj.put("url", url);
|
||||||
InAppBrowser.channel.invokeMethod("loadstart", obj);
|
InAppBrowserFlutterPlugin.channel.invokeMethod("loadstart", obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -114,7 +114,7 @@ public class InAppBrowserWebViewClient extends WebViewClient {
|
||||||
|
|
||||||
activity.isLoading = false;
|
activity.isLoading = false;
|
||||||
|
|
||||||
// CB-10395 InAppBrowser's WebView not storing cookies reliable to local device storage
|
// CB-10395 InAppBrowserFlutterPlugin's WebView not storing cookies reliable to local device storage
|
||||||
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.LOLLIPOP) {
|
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.LOLLIPOP) {
|
||||||
CookieManager.getInstance().flush();
|
CookieManager.getInstance().flush();
|
||||||
} else {
|
} else {
|
||||||
|
@ -127,7 +127,7 @@ public class InAppBrowserWebViewClient extends WebViewClient {
|
||||||
|
|
||||||
Map<String, Object> obj = new HashMap<>();
|
Map<String, Object> obj = new HashMap<>();
|
||||||
obj.put("url", url);
|
obj.put("url", url);
|
||||||
InAppBrowser.channel.invokeMethod("loadstop", obj);
|
InAppBrowserFlutterPlugin.channel.invokeMethod("loadstop", obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) {
|
public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) {
|
||||||
|
@ -139,7 +139,7 @@ public class InAppBrowserWebViewClient extends WebViewClient {
|
||||||
obj.put("url", failingUrl);
|
obj.put("url", failingUrl);
|
||||||
obj.put("code", errorCode);
|
obj.put("code", errorCode);
|
||||||
obj.put("message", description);
|
obj.put("message", description);
|
||||||
InAppBrowser.channel.invokeMethod("loaderror", obj);
|
InAppBrowserFlutterPlugin.channel.invokeMethod("loaderror", obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -13,8 +13,6 @@ import java.util.Map;
|
||||||
|
|
||||||
public abstract class RequestPermissionHandler implements ActivityCompat.OnRequestPermissionsResultCallback {
|
public abstract class RequestPermissionHandler implements ActivityCompat.OnRequestPermissionsResultCallback {
|
||||||
|
|
||||||
public static int REQUEST_CODE_WRITE_EXTERNAL_STORAGE = 0;
|
|
||||||
|
|
||||||
private static Map<Integer, List<Runnable>> actionDictionary = new HashMap<>();
|
private static Map<Integer, List<Runnable>> actionDictionary = new HashMap<>();
|
||||||
|
|
||||||
public static void checkAndRun(Activity activity, String permission, int requestCode, Runnable runnable) {
|
public static void checkAndRun(Activity activity, String permission, int requestCode, Runnable runnable) {
|
||||||
|
|
|
@ -1,39 +1,23 @@
|
||||||
package com.pichillilorenzo.flutter_inappbrowser;
|
package com.pichillilorenzo.flutter_inappbrowser;
|
||||||
|
|
||||||
import android.Manifest;
|
|
||||||
import android.app.Activity;
|
|
||||||
import android.app.DownloadManager;
|
|
||||||
import android.content.Context;
|
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.content.pm.PackageManager;
|
|
||||||
import android.graphics.Color;
|
import android.graphics.Color;
|
||||||
import android.graphics.drawable.ColorDrawable;
|
import android.graphics.drawable.ColorDrawable;
|
||||||
import android.net.Uri;
|
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import android.os.Environment;
|
|
||||||
import android.support.annotation.RequiresApi;
|
|
||||||
import android.support.v4.app.ActivityCompat;
|
|
||||||
import android.support.v4.content.ContextCompat;
|
|
||||||
import android.support.v7.app.ActionBar;
|
import android.support.v7.app.ActionBar;
|
||||||
import android.support.v7.app.AppCompatActivity;
|
import android.support.v7.app.AppCompatActivity;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.util.Log;
|
|
||||||
import android.view.KeyEvent;
|
import android.view.KeyEvent;
|
||||||
import android.view.Menu;
|
import android.view.Menu;
|
||||||
import android.view.MenuInflater;
|
import android.view.MenuInflater;
|
||||||
import android.view.MenuItem;
|
import android.view.MenuItem;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.webkit.CookieManager;
|
import android.webkit.CookieManager;
|
||||||
import android.webkit.DownloadListener;
|
|
||||||
import android.webkit.URLUtil;
|
|
||||||
import android.webkit.ValueCallback;
|
import android.webkit.ValueCallback;
|
||||||
import android.webkit.WebSettings;
|
import android.webkit.WebSettings;
|
||||||
import android.webkit.WebView;
|
import android.webkit.WebView;
|
||||||
import android.widget.AutoCompleteTextView;
|
|
||||||
import android.widget.ImageView;
|
|
||||||
import android.widget.ProgressBar;
|
import android.widget.ProgressBar;
|
||||||
import android.widget.SearchView;
|
import android.widget.SearchView;
|
||||||
import android.widget.Toast;
|
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
@ -64,7 +48,7 @@ public class WebViewActivity extends AppCompatActivity {
|
||||||
options = new InAppBrowserOptions();
|
options = new InAppBrowserOptions();
|
||||||
options.parse((HashMap<String, Object>) b.getSerializable("options"));
|
options.parse((HashMap<String, Object>) b.getSerializable("options"));
|
||||||
|
|
||||||
InAppBrowser.webViewActivity = this;
|
InAppBrowserFlutterPlugin.webViewActivity = this;
|
||||||
|
|
||||||
actionBar = getSupportActionBar();
|
actionBar = getSupportActionBar();
|
||||||
|
|
||||||
|
@ -82,39 +66,39 @@ public class WebViewActivity extends AppCompatActivity {
|
||||||
inAppBrowserWebViewClient = new InAppBrowserWebViewClient(this);
|
inAppBrowserWebViewClient = new InAppBrowserWebViewClient(this);
|
||||||
webView.setWebViewClient(inAppBrowserWebViewClient);
|
webView.setWebViewClient(inAppBrowserWebViewClient);
|
||||||
|
|
||||||
final Activity activity = this;
|
// final Activity activity = this;
|
||||||
|
//
|
||||||
webView.setDownloadListener(new DownloadListener() {
|
// webView.setDownloadListener(new DownloadListener() {
|
||||||
@Override
|
// @Override
|
||||||
public void onDownloadStart(final String url, final String userAgent,
|
// public void onDownloadStart(final String url, final String userAgent,
|
||||||
final String contentDisposition, final String mimetype,
|
// final String contentDisposition, final String mimetype,
|
||||||
final long contentLength) {
|
// final long contentLength) {
|
||||||
|
//
|
||||||
RequestPermissionHandler.checkAndRun(activity, Manifest.permission.WRITE_EXTERNAL_STORAGE, RequestPermissionHandler.REQUEST_CODE_WRITE_EXTERNAL_STORAGE, new Runnable(){
|
// RequestPermissionHandler.checkAndRun(activity, Manifest.permission.WRITE_EXTERNAL_STORAGE, RequestPermissionHandler.REQUEST_CODE_WRITE_EXTERNAL_STORAGE, new Runnable(){
|
||||||
@Override
|
// @Override
|
||||||
public void run(){
|
// public void run(){
|
||||||
DownloadManager.Request request = new DownloadManager.Request(
|
// DownloadManager.Request request = new DownloadManager.Request(
|
||||||
Uri.parse(url));
|
// Uri.parse(url));
|
||||||
|
//
|
||||||
final String filename = URLUtil.guessFileName(url, contentDisposition, mimetype);
|
// final String filename = URLUtil.guessFileName(url, contentDisposition, mimetype);
|
||||||
request.allowScanningByMediaScanner();
|
// request.allowScanningByMediaScanner();
|
||||||
request.setNotificationVisibility(DownloadManager.Request.VISIBILITY_VISIBLE_NOTIFY_COMPLETED); //Notify client once download is completed!
|
// request.setNotificationVisibility(DownloadManager.Request.VISIBILITY_VISIBLE_NOTIFY_COMPLETED); //Notify client once download is completed!
|
||||||
request.setVisibleInDownloadsUi(true);
|
// request.setVisibleInDownloadsUi(true);
|
||||||
request.setDestinationInExternalPublicDir(Environment.DIRECTORY_DOWNLOADS, filename);
|
// request.setDestinationInExternalPublicDir(Environment.DIRECTORY_DOWNLOADS, filename);
|
||||||
DownloadManager dm = (DownloadManager) getSystemService(DOWNLOAD_SERVICE);
|
// DownloadManager dm = (DownloadManager) getSystemService(DOWNLOAD_SERVICE);
|
||||||
if (dm != null) {
|
// if (dm != null) {
|
||||||
dm.enqueue(request);
|
// dm.enqueue(request);
|
||||||
Toast.makeText(getApplicationContext(), "Downloading File: " + filename, //To notify the Client that the file is being downloaded
|
// Toast.makeText(getApplicationContext(), "Downloading File: " + filename, //To notify the Client that the file is being downloaded
|
||||||
Toast.LENGTH_LONG).show();
|
// Toast.LENGTH_LONG).show();
|
||||||
}
|
// }
|
||||||
else {
|
// else {
|
||||||
Toast.makeText(getApplicationContext(), "Cannot Download File: " + filename, //To notify the Client that the file cannot be downloaded
|
// Toast.makeText(getApplicationContext(), "Cannot Download File: " + filename, //To notify the Client that the file cannot be downloaded
|
||||||
Toast.LENGTH_LONG).show();
|
// Toast.LENGTH_LONG).show();
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
|
|
||||||
WebSettings settings = webView.getSettings();
|
WebSettings settings = webView.getSettings();
|
||||||
|
|
||||||
|
@ -261,18 +245,6 @@ public class WebViewActivity extends AppCompatActivity {
|
||||||
return super.onKeyDown(keyCode, event);
|
return super.onKeyDown(keyCode, event);
|
||||||
}
|
}
|
||||||
|
|
||||||
// @TargetApi(Build.VERSION_CODES.KITKAT)
|
|
||||||
// void eval(MethodCall call, final MethodChannel.Result result) {
|
|
||||||
// String code = call.argument("code");
|
|
||||||
//
|
|
||||||
// webView.evaluateJavascript(code, new ValueCallback<String>() {
|
|
||||||
// @Override
|
|
||||||
// public void onReceiveValue(String value) {
|
|
||||||
// result.success(value);
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
// }
|
|
||||||
|
|
||||||
public void close() {
|
public void close() {
|
||||||
finish();
|
finish();
|
||||||
}
|
}
|
||||||
|
|
|
@ -54,6 +54,7 @@ target 'Runner' do
|
||||||
File.symlink(p[:path], symlink)
|
File.symlink(p[:path], symlink)
|
||||||
pod p[:name], :path => File.join(symlink, 'ios')
|
pod p[:name], :path => File.join(symlink, 'ios')
|
||||||
}
|
}
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
post_install do |installer|
|
post_install do |installer|
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>BuildSystemType</key>
|
||||||
|
<string>Original</string>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
|
@ -11,9 +11,24 @@ class MyInAppBrowser extends InAppBrowser {
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void onLoadStop(String url) {
|
void onLoadStop(String url) async {
|
||||||
super.onLoadStop(url);
|
super.onLoadStop(url);
|
||||||
print("\n\nStopped $url\n\n");
|
print("\n\nStopped $url\n\n");
|
||||||
|
print(await this.injectScriptCode("document.body.innerHTML"));
|
||||||
|
print(await this.injectScriptCode("3"));
|
||||||
|
print(await this.injectScriptCode("""
|
||||||
|
function asd (a,b) {
|
||||||
|
return a+b;
|
||||||
|
};
|
||||||
|
asd(3,5);
|
||||||
|
"""));
|
||||||
|
print(await this.injectScriptCode("""
|
||||||
|
["3",56,"sdf"];
|
||||||
|
"""));
|
||||||
|
print(await this.injectScriptCode("""
|
||||||
|
var x = {"as":4, "dfdfg": 6};
|
||||||
|
x;
|
||||||
|
"""));
|
||||||
/*this.injectScriptFile("https://code.jquery.com/jquery-3.3.1.min.js");
|
/*this.injectScriptFile("https://code.jquery.com/jquery-3.3.1.min.js");
|
||||||
this.injectScriptCode("""
|
this.injectScriptCode("""
|
||||||
\$( "body" ).html( "Next Step..." )
|
\$( "body" ).html( "Next Step..." )
|
||||||
|
@ -68,7 +83,7 @@ class _MyAppState extends State<MyApp> {
|
||||||
child: new RaisedButton(onPressed: () {
|
child: new RaisedButton(onPressed: () {
|
||||||
inAppBrowser.open("https://flutter.io/", options: {
|
inAppBrowser.open("https://flutter.io/", options: {
|
||||||
//"toolbarTopFixedTitle": "Fixed title",
|
//"toolbarTopFixedTitle": "Fixed title",
|
||||||
"hideUrlBar": true,
|
//"hideUrlBar": true,
|
||||||
//"toolbarTop": false,
|
//"toolbarTop": false,
|
||||||
//"toolbarBottom": false
|
//"toolbarBottom": false
|
||||||
});
|
});
|
||||||
|
|
|
@ -14,6 +14,7 @@
|
||||||
<excludeFolder url="file://$MODULE_DIR$/example/flutter_plugin/.dart_tool" />
|
<excludeFolder url="file://$MODULE_DIR$/example/flutter_plugin/.dart_tool" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/example/flutter_plugin/.pub" />
|
<excludeFolder url="file://$MODULE_DIR$/example/flutter_plugin/.pub" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/example/flutter_plugin/build" />
|
<excludeFolder url="file://$MODULE_DIR$/example/flutter_plugin/build" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/example/flutter_plugin/example/ios/Flutter/flutter_assets/packages" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/example/ios/Flutter/flutter_assets/packages" />
|
<excludeFolder url="file://$MODULE_DIR$/example/ios/Flutter/flutter_assets/packages" />
|
||||||
</content>
|
</content>
|
||||||
<orderEntry type="sourceFolder" forTests="false" />
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
|
|
||||||
#import <Flutter/Flutter.h>
|
#import <Flutter/Flutter.h>
|
||||||
|
|
||||||
@interface InAppBrowser : NSObject<FlutterPlugin>
|
@interface InAppBrowserFlutterPlugin : NSObject<FlutterPlugin>
|
||||||
+ (void)registerWithRegistrar:(nonnull NSObject<FlutterPluginRegistrar> *)registrar;
|
+ (void)registerWithRegistrar:(nonnull NSObject<FlutterPluginRegistrar> *)registrar;
|
||||||
|
|
||||||
@end
|
@end
|
|
@ -15,10 +15,10 @@
|
||||||
under the License.
|
under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#import "InAppBrowser.h"
|
#import "InAppBrowserFlutterPlugin.h"
|
||||||
#import <flutter_inappbrowser/flutter_inappbrowser-Swift.h>
|
#import <flutter_inappbrowser/flutter_inappbrowser-Swift.h>
|
||||||
|
|
||||||
@implementation InAppBrowser : NSObject
|
@implementation InAppBrowserFlutterPlugin : NSObject
|
||||||
+ (void)registerWithRegistrar:(NSObject<FlutterPluginRegistrar>*)registrar {
|
+ (void)registerWithRegistrar:(NSObject<FlutterPluginRegistrar>*)registrar {
|
||||||
[SwiftFlutterPlugin registerWithRegistrar:registrar];
|
[SwiftFlutterPlugin registerWithRegistrar:registrar];
|
||||||
}
|
}
|
|
@ -433,6 +433,40 @@ class InAppBrowserWebViewController: UIViewController, WKUIDelegate, WKNavigatio
|
||||||
decisionHandler(.allow)
|
decisionHandler(.allow)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// func webView(_ webView: WKWebView,
|
||||||
|
// decidePolicyFor navigationResponse: WKNavigationResponse,
|
||||||
|
// decisionHandler: @escaping (WKNavigationResponsePolicy) -> Void) {
|
||||||
|
// let mimeType = navigationResponse.response.mimeType
|
||||||
|
// if mimeType != nil && !mimeType!.starts(with: "text/") {
|
||||||
|
// download(url: webView.url)
|
||||||
|
// decisionHandler(.cancel)
|
||||||
|
// return
|
||||||
|
// }
|
||||||
|
// decisionHandler(.allow)
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// func download (url: URL?) {
|
||||||
|
// let filename = url?.lastPathComponent
|
||||||
|
//
|
||||||
|
// let destination: DownloadRequest.DownloadFileDestination = { _, _ in
|
||||||
|
// let documentsURL = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask)[0]
|
||||||
|
// let fileURL = documentsURL.appendingPathComponent(filename!)
|
||||||
|
//
|
||||||
|
// return (fileURL, [.removePreviousFile, .createIntermediateDirectories])
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// Alamofire.download((url?.absoluteString)!, to: destination).downloadProgress { progress in
|
||||||
|
// print("Download Progress: \(progress.fractionCompleted)")
|
||||||
|
// }.response { response in
|
||||||
|
// if response.error == nil, let path = response.destinationURL?.path {
|
||||||
|
// UIAlertView(title: nil, message: "File saved to " + path, delegate: nil, cancelButtonTitle: nil).show()
|
||||||
|
// }
|
||||||
|
// else {
|
||||||
|
// UIAlertView(title: nil, message: "Cannot save " + filename!, delegate: nil, cancelButtonTitle: nil).show()
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
func webView(_ webView: WKWebView, didStartProvisionalNavigation navigation: WKNavigation!) {
|
func webView(_ webView: WKWebView, didStartProvisionalNavigation navigation: WKNavigation!) {
|
||||||
// loading url, start spinner, update back/forward
|
// loading url, start spinner, update back/forward
|
||||||
backButton.isEnabled = webView.canGoBack
|
backButton.isEnabled = webView.canGoBack
|
||||||
|
|
|
@ -88,22 +88,22 @@ public class SwiftFlutterPlugin: NSObject, FlutterPlugin {
|
||||||
result(true)
|
result(true)
|
||||||
break
|
break
|
||||||
case "injectScriptCode":
|
case "injectScriptCode":
|
||||||
self.injectScriptCode(arguments: arguments!)
|
self.injectScriptCode(arguments: arguments!, result: result)
|
||||||
result(true)
|
|
||||||
break
|
break
|
||||||
case "injectScriptFile":
|
case "injectScriptFile":
|
||||||
self.injectScriptFile(arguments: arguments!)
|
self.injectScriptFile(arguments: arguments!, result: nil)
|
||||||
result(true)
|
result(true)
|
||||||
break
|
break
|
||||||
case "injectStyleCode":
|
case "injectStyleCode":
|
||||||
self.injectStyleCode(arguments: arguments!)
|
self.injectStyleCode(arguments: arguments!, result: nil)
|
||||||
result(true)
|
result(true)
|
||||||
break
|
break
|
||||||
case "injectStyleFile":
|
case "injectStyleFile":
|
||||||
self.injectStyleFile(arguments: arguments!)
|
self.injectStyleFile(arguments: arguments!, result: nil)
|
||||||
result(true)
|
result(true)
|
||||||
break
|
break
|
||||||
default:
|
default:
|
||||||
|
result(FlutterMethodNotImplemented)
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -151,7 +151,7 @@ public class SwiftFlutterPlugin: NSObject, FlutterPlugin {
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
print("url is empty")
|
print("url is empty")
|
||||||
result(false)
|
result(FlutterError(code: "InAppBrowserFlutterPlugin", message: "url is empty", details: nil))
|
||||||
}
|
}
|
||||||
result(true)
|
result(true)
|
||||||
}
|
}
|
||||||
|
@ -166,7 +166,7 @@ public class SwiftFlutterPlugin: NSObject, FlutterPlugin {
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
print("url is empty")
|
print("url is empty")
|
||||||
result(false)
|
result(FlutterError(code: "InAppBrowserFlutterPlugin", message: "url is empty", details: nil))
|
||||||
}
|
}
|
||||||
result(true)
|
result(true)
|
||||||
}
|
}
|
||||||
|
@ -265,39 +265,54 @@ public class SwiftFlutterPlugin: NSObject, FlutterPlugin {
|
||||||
// '%@' marker).
|
// '%@' marker).
|
||||||
//
|
//
|
||||||
// If no wrapper is supplied, then the source string is executed directly.
|
// If no wrapper is supplied, then the source string is executed directly.
|
||||||
func injectDeferredObject(_ source: String, withWrapper jsWrapper: String) {
|
func injectDeferredObject(_ source: String, withWrapper jsWrapper: String, result: FlutterResult?) {
|
||||||
//if jsWrapper != nil {
|
|
||||||
let jsonData: Data? = try? JSONSerialization.data(withJSONObject: [source], options: [])
|
let jsonData: Data? = try? JSONSerialization.data(withJSONObject: [source], options: [])
|
||||||
let sourceArrayString = String(data: jsonData!, encoding: String.Encoding.utf8)
|
let sourceArrayString = String(data: jsonData!, encoding: String.Encoding.utf8)
|
||||||
if sourceArrayString != nil {
|
if sourceArrayString != nil {
|
||||||
let sourceString: String? = (sourceArrayString! as NSString).substring(with: NSRange(location: 1, length: (sourceArrayString?.characters.count ?? 0) - 2))
|
let sourceString: String? = (sourceArrayString! as NSString).substring(with: NSRange(location: 1, length: (sourceArrayString?.characters.count ?? 0) - 2))
|
||||||
let jsToInject = String(format: jsWrapper, sourceString!)
|
let jsToInject = String(format: jsWrapper, sourceString!)
|
||||||
webViewController?.webView?.evaluateJavaScript(jsToInject)
|
|
||||||
}
|
webViewController?.webView?.evaluateJavaScript(jsToInject, completionHandler: {(value, error) in
|
||||||
//}
|
if result == nil {
|
||||||
//else {
|
return
|
||||||
// webViewController?.webView?.evaluateJavaScript(source)
|
|
||||||
//}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public func injectScriptCode(arguments: NSDictionary) {
|
do {
|
||||||
let jsWrapper = "(function(){JSON.stringify([eval(%@)])})()"
|
let data: Data = ("[" + String(describing: value!) + "]").data(using: String.Encoding.utf8, allowLossyConversion: false)!
|
||||||
injectDeferredObject(arguments["source"] as! String, withWrapper: jsWrapper)
|
let json: Array<Any> = try JSONSerialization.jsonObject(with: data, options: []) as! Array<Any>
|
||||||
|
if json[0] is String {
|
||||||
|
result!(json[0])
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
result!(value)
|
||||||
|
}
|
||||||
|
} catch let error as NSError {
|
||||||
|
print("Failed to load: \(error.localizedDescription)")
|
||||||
|
result!(FlutterError(code: "InAppBrowserFlutterPlugin", message: "Failed to load: \(error.localizedDescription)", details: error))
|
||||||
}
|
}
|
||||||
|
|
||||||
public func injectScriptFile(arguments: NSDictionary) {
|
})
|
||||||
let jsWrapper = "(function(d) { var c = d.createElement('script'); c.src = %@; d.body.appendChild(c); })(document)"
|
}
|
||||||
injectDeferredObject(arguments["urlFile"] as! String, withWrapper: jsWrapper)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public func injectStyleCode(arguments: NSDictionary) {
|
public func injectScriptCode(arguments: NSDictionary, result: FlutterResult?) {
|
||||||
let jsWrapper = "(function(d) { var c = d.createElement('style'); c.innerHTML = %@; d.body.appendChild(c); })(document)"
|
let jsWrapper = "(function(){return JSON.stringify(eval(%@));})();"
|
||||||
injectDeferredObject(arguments["source"] as! String, withWrapper: jsWrapper)
|
injectDeferredObject(arguments["source"] as! String, withWrapper: jsWrapper, result: result)
|
||||||
}
|
}
|
||||||
|
|
||||||
public func injectStyleFile(arguments: NSDictionary) {
|
public func injectScriptFile(arguments: NSDictionary, result: FlutterResult?) {
|
||||||
let jsWrapper = "(function(d) { var c = d.createElement('link'); c.rel='stylesheet', c.type='text/css'; c.href = %@; d.body.appendChild(c); })(document)"
|
let jsWrapper = "(function(d) { var c = d.createElement('script'); c.src = %@; d.body.appendChild(c); })(document);"
|
||||||
injectDeferredObject(arguments["urlFile"] as! String, withWrapper: jsWrapper)
|
injectDeferredObject(arguments["urlFile"] as! String, withWrapper: jsWrapper, result: result)
|
||||||
|
}
|
||||||
|
|
||||||
|
public func injectStyleCode(arguments: NSDictionary, result: FlutterResult?) {
|
||||||
|
let jsWrapper = "(function(d) { var c = d.createElement('style'); c.innerHTML = %@; d.body.appendChild(c); })(document);"
|
||||||
|
injectDeferredObject(arguments["source"] as! String, withWrapper: jsWrapper, result: result)
|
||||||
|
}
|
||||||
|
|
||||||
|
public func injectStyleFile(arguments: NSDictionary, result: FlutterResult?) {
|
||||||
|
let jsWrapper = "(function(d) { var c = d.createElement('link'); c.rel='stylesheet', c.type='text/css'; c.href = %@; d.body.appendChild(c); })(document);"
|
||||||
|
injectDeferredObject(arguments["urlFile"] as! String, withWrapper: jsWrapper, result: result)
|
||||||
}
|
}
|
||||||
|
|
||||||
func webViewDidStartLoad(_ webView: WKWebView) {
|
func webViewDidStartLoad(_ webView: WKWebView) {
|
||||||
|
|
|
@ -174,7 +174,7 @@ class InAppBrowser {
|
||||||
}
|
}
|
||||||
|
|
||||||
///Injects JavaScript code into the [InAppBrowser] window. (Only available when the target is set to `_blank` or to `_self`)
|
///Injects JavaScript code into the [InAppBrowser] window. (Only available when the target is set to `_blank` or to `_self`)
|
||||||
Future<void> injectScriptCode(String source) async {
|
Future<dynamic> injectScriptCode(String source) async {
|
||||||
Map<String, dynamic> args = <String, dynamic>{};
|
Map<String, dynamic> args = <String, dynamic>{};
|
||||||
args.putIfAbsent('source', () => source);
|
args.putIfAbsent('source', () => source);
|
||||||
return await _channel.invokeMethod('injectScriptCode', args);
|
return await _channel.invokeMethod('injectScriptCode', args);
|
||||||
|
@ -221,9 +221,4 @@ class InAppBrowser {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
///
|
|
||||||
void onCustomScheme(String url) {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,7 +18,7 @@ dependencies:
|
||||||
flutter:
|
flutter:
|
||||||
plugin:
|
plugin:
|
||||||
androidPackage: com.pichillilorenzo.flutter_inappbrowser
|
androidPackage: com.pichillilorenzo.flutter_inappbrowser
|
||||||
pluginClass: InAppBrowser
|
pluginClass: InAppBrowserFlutterPlugin
|
||||||
|
|
||||||
# To add assets to your plugin package, add an assets section, like this:
|
# To add assets to your plugin package, add an assets section, like this:
|
||||||
# assets:
|
# assets:
|
||||||
|
|
Loading…
Reference in New Issue