updated README.md and documentation
This commit is contained in:
parent
b3cdd8bfc8
commit
db65f7a042
288
.idea/workspace.xml
generated
288
.idea/workspace.xml
generated
@ -11,7 +11,13 @@
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="9b41f7a2-a71e-4923-91fb-249d7815b3e7" name="Default" comment="">
|
||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
|
||||
<change beforePath="$PROJECT_DIR$/example/ios/Podfile" afterPath="$PROJECT_DIR$/example/ios/Podfile" />
|
||||
<change beforePath="$PROJECT_DIR$/CHANGELOG.md" afterPath="$PROJECT_DIR$/CHANGELOG.md" />
|
||||
<change beforePath="$PROJECT_DIR$/README.md" afterPath="$PROJECT_DIR$/README.md" />
|
||||
<change beforePath="$PROJECT_DIR$/android/src/main/java/com/pichillilorenzo/flutter_inappbrowser/InAppBrowserFlutterPlugin.java" afterPath="$PROJECT_DIR$/android/src/main/java/com/pichillilorenzo/flutter_inappbrowser/InAppBrowserFlutterPlugin.java" />
|
||||
<change beforePath="$PROJECT_DIR$/example/lib/main.dart" afterPath="$PROJECT_DIR$/example/lib/main.dart" />
|
||||
<change beforePath="$PROJECT_DIR$/ios/Classes/SafariBrowserOptions.swift" afterPath="$PROJECT_DIR$/ios/Classes/SafariBrowserOptions.swift" />
|
||||
<change beforePath="$PROJECT_DIR$/ios/Classes/SafariViewController.swift" afterPath="$PROJECT_DIR$/ios/Classes/SafariViewController.swift" />
|
||||
<change beforePath="$PROJECT_DIR$/lib/flutter_inappbrowser.dart" afterPath="$PROJECT_DIR$/lib/flutter_inappbrowser.dart" />
|
||||
</list>
|
||||
<ignored path="$PROJECT_DIR$/.dart_tool/" />
|
||||
<ignored path="$PROJECT_DIR$/.idea/" />
|
||||
@ -31,8 +37,8 @@
|
||||
<file leaf-file-name="flutter_inappbrowser.dart" pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/lib/flutter_inappbrowser.dart">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="4260">
|
||||
<caret line="307" column="30" lean-forward="false" selection-start-line="307" selection-start-column="30" selection-end-line="307" selection-end-column="30" />
|
||||
<state relative-caret-position="135">
|
||||
<caret line="337" column="40" lean-forward="false" selection-start-line="337" selection-start-column="40" selection-end-line="337" selection-end-column="40" />
|
||||
<folding>
|
||||
<element signature="e#814#834#0" expanded="true" />
|
||||
</folding>
|
||||
@ -40,34 +46,76 @@
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="CHANGELOG.md" pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/CHANGELOG.md">
|
||||
<file leaf-file-name="README.md" pinned="false" current-in-tab="true">
|
||||
<entry file="file://$PROJECT_DIR$/README.md">
|
||||
<provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
|
||||
<state split_layout="SPLIT">
|
||||
<first_editor relative-caret-position="60">
|
||||
<caret line="4" column="60" lean-forward="false" selection-start-line="4" selection-start-column="2" selection-end-line="4" selection-end-column="60" />
|
||||
<folding />
|
||||
<first_editor relative-caret-position="133">
|
||||
<caret line="460" column="0" lean-forward="true" selection-start-line="460" selection-start-column="0" selection-end-line="460" selection-end-column="0" />
|
||||
<folding>
|
||||
<marker date="1538738179486" expanded="true" signature="1261:1358" ph="..." />
|
||||
<marker date="1538738179486" expanded="true" signature="1402:2447" ph="{...}" />
|
||||
<marker date="1538738179486" expanded="true" signature="1448:1488" ph="{...}" />
|
||||
<marker date="1538738179486" expanded="true" signature="1540:2114" ph="{...}" />
|
||||
<marker date="1538738179486" expanded="true" signature="1826:1879" ph=""""..."""" />
|
||||
<marker date="1538738179486" expanded="true" signature="1934:2006" ph=""""..."""" />
|
||||
<marker date="1538738179486" expanded="true" signature="2185:2246" ph="{...}" />
|
||||
<marker date="1538738179486" expanded="true" signature="2276:2319" ph="{...}" />
|
||||
<marker date="1538738179486" expanded="true" signature="2379:2444" ph="{...}" />
|
||||
<marker date="1538738179486" expanded="true" signature="2574:2639" ph="{...}" />
|
||||
<marker date="1538738179486" expanded="true" signature="2680:3269" ph="{...}" />
|
||||
<marker date="1538738179486" expanded="true" signature="2714:2742" ph="{...}" />
|
||||
<marker date="1538738179486" expanded="true" signature="2793:3267" ph="{...}" />
|
||||
<marker date="1538738179486" expanded="true" signature="2821:3262" ph="(...)" />
|
||||
<marker date="1538738179486" expanded="true" signature="2847:3255" ph="(...)" />
|
||||
<marker date="1538738179486" expanded="true" signature="2875:2958" ph="(...)" />
|
||||
<marker date="1538738179486" expanded="true" signature="2904:2947" ph="(...)" />
|
||||
<marker date="1538738179486" expanded="true" signature="2984:3246" ph="(...)" />
|
||||
<marker date="1538738179486" expanded="true" signature="3019:3235" ph="(...)" />
|
||||
<marker date="1538738179486" expanded="true" signature="3098:3165" ph="{...}" />
|
||||
<marker date="1538738179486" expanded="true" signature="10852:10860" ph="{...}" />
|
||||
<marker date="1538738179486" expanded="true" signature="10979:10987" ph="{...}" />
|
||||
<marker date="1538738179486" expanded="true" signature="11147:11155" ph="{...}" />
|
||||
<marker date="1538738179486" expanded="true" signature="11251:11259" ph="{...}" />
|
||||
<marker date="1538738179486" expanded="true" signature="11543:11549" ph="{...}" />
|
||||
<marker date="1538738179486" expanded="true" signature="14258:14355" ph="..." />
|
||||
<marker date="1538738179486" expanded="true" signature="14399:14795" ph="{...}" />
|
||||
<marker date="1538738179486" expanded="true" signature="14453:14493" ph="{...}" />
|
||||
<marker date="1538738179486" expanded="true" signature="14545:14585" ph="{...}" />
|
||||
<marker date="1538738179486" expanded="true" signature="14656:14717" ph="{...}" />
|
||||
<marker date="1538738179486" expanded="true" signature="14747:14790" ph="{...}" />
|
||||
<marker date="1538738179486" expanded="true" signature="14914:15224" ph="{...}" />
|
||||
<marker date="1538738179486" expanded="true" signature="15017:15064" ph="{...}" />
|
||||
<marker date="1538738179486" expanded="true" signature="15096:15143" ph="{...}" />
|
||||
<marker date="1538738179486" expanded="true" signature="15175:15222" ph="{...}" />
|
||||
<marker date="1538738179486" expanded="true" signature="15295:15317" ph="(...)" />
|
||||
<marker date="1538738179486" expanded="true" signature="15393:15458" ph="{...}" />
|
||||
<marker date="1538738179486" expanded="true" signature="15499:16401" ph="{...}" />
|
||||
<marker date="1538738179486" expanded="true" signature="15533:15561" ph="{...}" />
|
||||
<marker date="1538738179486" expanded="true" signature="15612:16399" ph="{...}" />
|
||||
<marker date="1538738179486" expanded="true" signature="15640:16394" ph="(...)" />
|
||||
<marker date="1538738179486" expanded="true" signature="15666:16387" ph="(...)" />
|
||||
<marker date="1538738179486" expanded="true" signature="15694:15777" ph="(...)" />
|
||||
<marker date="1538738179486" expanded="true" signature="15723:15766" ph="(...)" />
|
||||
<marker date="1538738179486" expanded="true" signature="15803:16378" ph="(...)" />
|
||||
<marker date="1538738179486" expanded="true" signature="15838:16367" ph="(...)" />
|
||||
<marker date="1538738179486" expanded="true" signature="15924:16138" ph="{...}" />
|
||||
<marker date="1538738179486" expanded="true" signature="16171:16290" ph="{...}" />
|
||||
<marker date="1538738179486" expanded="true" signature="19145:19153" ph="{...}" />
|
||||
<marker date="1538738179486" expanded="true" signature="19251:19259" ph="{...}" />
|
||||
<marker date="1538738179486" expanded="true" signature="19357:19365" ph="{...}" />
|
||||
</folding>
|
||||
</first_editor>
|
||||
<second_editor />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="Podfile" pinned="false" current-in-tab="true">
|
||||
<entry file="file://$PROJECT_DIR$/example/ios/Podfile">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="695">
|
||||
<caret line="65" column="52" lean-forward="false" selection-start-line="65" selection-start-column="52" selection-end-line="65" selection-end-column="52" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="main.dart" pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/example/lib/main.dart">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="1860">
|
||||
<caret line="124" column="36" lean-forward="false" selection-start-line="124" selection-start-column="36" selection-end-line="124" selection-end-column="36" />
|
||||
<state relative-caret-position="395">
|
||||
<caret line="101" column="38" lean-forward="false" selection-start-line="101" selection-start-column="38" selection-end-line="101" selection-end-column="38" />
|
||||
<folding>
|
||||
<element signature="e#0#39#0" expanded="true" />
|
||||
</folding>
|
||||
@ -86,8 +134,6 @@
|
||||
</component>
|
||||
<component name="FindInProjectRecents">
|
||||
<findStrings>
|
||||
<find>(0)</find>
|
||||
<find>closeDi</find>
|
||||
<find>hide()</find>
|
||||
<find>loadUrl</find>
|
||||
<find>showWebPage</find>
|
||||
@ -116,6 +162,8 @@
|
||||
<find>sourceFile</find>
|
||||
<find>hideUrlBar</find>
|
||||
<find>InAppBrowser</find>
|
||||
<find>###</find>
|
||||
<find>presentationStyle</find>
|
||||
</findStrings>
|
||||
<replaceStrings>
|
||||
<replace>activity.getPreferences(0)</replace>
|
||||
@ -153,17 +201,17 @@
|
||||
<option value="$PROJECT_DIR$/android/src/main/java/com/pichillilorenzo/flutter_inappbrowser/InAppBrowser.java" />
|
||||
<option value="$PROJECT_DIR$/ios/flutter_inappbrowser.podspec" />
|
||||
<option value="$PROJECT_DIR$/android/build.gradle" />
|
||||
<option value="$PROJECT_DIR$/README.md" />
|
||||
<option value="$PROJECT_DIR$/pubspec.yaml" />
|
||||
<option value="$PROJECT_DIR$/example/ios/Podfile" />
|
||||
<option value="$PROJECT_DIR$/CHANGELOG.md" />
|
||||
<option value="$PROJECT_DIR$/example/lib/main.dart" />
|
||||
<option value="$PROJECT_DIR$/lib/flutter_inappbrowser.dart" />
|
||||
<option value="$PROJECT_DIR$/CHANGELOG.md" />
|
||||
<option value="$PROJECT_DIR$/example/ios/Podfile" />
|
||||
<option value="$PROJECT_DIR$/README.md" />
|
||||
</list>
|
||||
</option>
|
||||
</component>
|
||||
<component name="ProjectFrameBounds">
|
||||
<option name="x" value="98" />
|
||||
<option name="x" value="96" />
|
||||
<option name="y" value="23" />
|
||||
<option name="width" value="1582" />
|
||||
<option name="height" value="1018" />
|
||||
@ -184,9 +232,6 @@
|
||||
<foldersAlwaysOnTop value="true" />
|
||||
</navigator>
|
||||
<panes>
|
||||
<pane id="AndroidView" />
|
||||
<pane id="Scope" />
|
||||
<pane id="PackagesPane" />
|
||||
<pane id="Scratches" />
|
||||
<pane id="ProjectPane">
|
||||
<subPane>
|
||||
@ -195,11 +240,24 @@
|
||||
<item name="flutter_inappbrowser" type="b2602c69:ProjectViewProjectNode" />
|
||||
<item name="flutter_inappbrowser" 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" />
|
||||
</path>
|
||||
<path>
|
||||
<item name="flutter_inappbrowser" type="b2602c69:ProjectViewProjectNode" />
|
||||
<item name="flutter_inappbrowser" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="lib" type="462c0819:PsiDirectoryNode" />
|
||||
</path>
|
||||
</expand>
|
||||
<select />
|
||||
</subPane>
|
||||
<option name="show-excluded-files" value="false" />
|
||||
</pane>
|
||||
<pane id="Scope" />
|
||||
<pane id="AndroidView" />
|
||||
<pane id="PackagesPane" />
|
||||
</panes>
|
||||
</component>
|
||||
<component name="PropertiesComponent">
|
||||
@ -389,20 +447,20 @@
|
||||
<servers />
|
||||
</component>
|
||||
<component name="ToolWindowManager">
|
||||
<frame x="98" y="23" width="1582" height="1018" extended-state="0" />
|
||||
<frame x="96" y="23" width="1582" height="1018" extended-state="0" />
|
||||
<editor active="true" />
|
||||
<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="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="true" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.23777778" 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="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="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="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32161874" sideWeight="0.4973545" order="2" 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.3211111" 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="false" show_stripe_button="true" weight="0.34" sideWeight="0.4973545" order="10" 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.27888888" sideWeight="0.4973545" order="10" 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="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" />
|
||||
@ -414,13 +472,14 @@
|
||||
<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="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.32987013" 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="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="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="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.23777778" sideWeight="0.5" order="12" 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>
|
||||
@ -430,32 +489,33 @@
|
||||
<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="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="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="Event Log" 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="8" 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="9" 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.32977968" 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="10" 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="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="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="11" 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="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="3" 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="4" 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="Structure" active="false" anchor="left" 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="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="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="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="4" side_tool="true" 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.3290735" sideWeight="0.5" order="11" 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.23777778" 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="5" 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="5" 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="6" 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="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.2618262" sideWeight="0.5" 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="12" 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.3290735" sideWeight="0.5" order="13" 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.33" sideWeight="0.5" order="6" 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.1934085" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
|
||||
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32161874" 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.27888888" 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="6" 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.18376623" 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="7" 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="7" 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="8" 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.32987013" sideWeight="0.5" order="8" side_tool="false" content_ui="tabs" />
|
||||
</layout-to-restore>
|
||||
</component>
|
||||
<component name="VcsContentAnnotationSettings">
|
||||
@ -463,7 +523,7 @@
|
||||
</component>
|
||||
<component name="XDebuggerManager">
|
||||
<breakpoint-manager>
|
||||
<option name="time" value="5" />
|
||||
<option name="time" value="9" />
|
||||
</breakpoint-manager>
|
||||
<watches-manager />
|
||||
</component>
|
||||
@ -606,13 +666,6 @@
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/example/pubspec.yaml">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="0">
|
||||
<caret line="0" column="6" lean-forward="false" selection-start-line="0" selection-start-column="6" selection-end-line="0" selection-end-column="26" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/ios/Classes/InAppBrowser.h" />
|
||||
<entry file="file://$PROJECT_DIR$/ios/Classes/InAppBrowser.m" />
|
||||
<entry file="file://$PROJECT_DIR$/LICENSE">
|
||||
@ -725,16 +778,6 @@
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/README.md">
|
||||
<provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
|
||||
<state split_layout="SPLIT">
|
||||
<first_editor relative-caret-position="302">
|
||||
<caret line="225" column="29" lean-forward="false" selection-start-line="225" selection-start-column="29" selection-end-line="225" selection-end-column="29" />
|
||||
</first_editor>
|
||||
<second_editor />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/pubspec.lock">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="0">
|
||||
@ -749,10 +792,43 @@
|
||||
</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" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/example/ios/Podfile">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="539">
|
||||
<caret line="65" column="52" lean-forward="false" selection-start-line="65" selection-start-column="52" selection-end-line="65" selection-end-column="52" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/example/pubspec.yaml">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="0">
|
||||
<caret line="0" column="6" lean-forward="false" selection-start-line="0" selection-start-column="6" selection-end-line="0" selection-end-column="26" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/CHANGELOG.md">
|
||||
<provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
|
||||
<state split_layout="SPLIT">
|
||||
<first_editor relative-caret-position="45">
|
||||
<caret line="3" column="49" lean-forward="true" selection-start-line="3" selection-start-column="19" selection-end-line="3" selection-end-column="49" />
|
||||
<folding />
|
||||
</first_editor>
|
||||
<second_editor />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/example/lib/main.dart">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="1860">
|
||||
<caret line="124" column="36" lean-forward="false" selection-start-line="124" selection-start-column="36" selection-end-line="124" selection-end-column="36" />
|
||||
<state relative-caret-position="395">
|
||||
<caret line="101" column="38" lean-forward="false" selection-start-line="101" selection-start-column="38" selection-end-line="101" selection-end-column="38" />
|
||||
<folding>
|
||||
<element signature="e#0#39#0" expanded="true" />
|
||||
</folding>
|
||||
@ -761,41 +837,77 @@
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/lib/flutter_inappbrowser.dart">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="4260">
|
||||
<caret line="307" column="30" lean-forward="false" selection-start-line="307" selection-start-column="30" selection-end-line="307" selection-end-column="30" />
|
||||
<state relative-caret-position="135">
|
||||
<caret line="337" column="40" lean-forward="false" selection-start-line="337" selection-start-column="40" selection-end-line="337" selection-end-column="40" />
|
||||
<folding>
|
||||
<element signature="e#814#834#0" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/CHANGELOG.md">
|
||||
<entry file="file://$PROJECT_DIR$/README.md">
|
||||
<provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
|
||||
<state split_layout="SPLIT">
|
||||
<first_editor relative-caret-position="60">
|
||||
<caret line="4" column="60" lean-forward="false" selection-start-line="4" selection-start-column="2" selection-end-line="4" selection-end-column="60" />
|
||||
<folding />
|
||||
<first_editor relative-caret-position="133">
|
||||
<caret line="460" column="0" lean-forward="true" selection-start-line="460" selection-start-column="0" selection-end-line="460" selection-end-column="0" />
|
||||
<folding>
|
||||
<marker date="1538738179486" expanded="true" signature="1261:1358" ph="..." />
|
||||
<marker date="1538738179486" expanded="true" signature="1402:2447" ph="{...}" />
|
||||
<marker date="1538738179486" expanded="true" signature="1448:1488" ph="{...}" />
|
||||
<marker date="1538738179486" expanded="true" signature="1540:2114" ph="{...}" />
|
||||
<marker date="1538738179486" expanded="true" signature="1826:1879" ph=""""..."""" />
|
||||
<marker date="1538738179486" expanded="true" signature="1934:2006" ph=""""..."""" />
|
||||
<marker date="1538738179486" expanded="true" signature="2185:2246" ph="{...}" />
|
||||
<marker date="1538738179486" expanded="true" signature="2276:2319" ph="{...}" />
|
||||
<marker date="1538738179486" expanded="true" signature="2379:2444" ph="{...}" />
|
||||
<marker date="1538738179486" expanded="true" signature="2574:2639" ph="{...}" />
|
||||
<marker date="1538738179486" expanded="true" signature="2680:3269" ph="{...}" />
|
||||
<marker date="1538738179486" expanded="true" signature="2714:2742" ph="{...}" />
|
||||
<marker date="1538738179486" expanded="true" signature="2793:3267" ph="{...}" />
|
||||
<marker date="1538738179486" expanded="true" signature="2821:3262" ph="(...)" />
|
||||
<marker date="1538738179486" expanded="true" signature="2847:3255" ph="(...)" />
|
||||
<marker date="1538738179486" expanded="true" signature="2875:2958" ph="(...)" />
|
||||
<marker date="1538738179486" expanded="true" signature="2904:2947" ph="(...)" />
|
||||
<marker date="1538738179486" expanded="true" signature="2984:3246" ph="(...)" />
|
||||
<marker date="1538738179486" expanded="true" signature="3019:3235" ph="(...)" />
|
||||
<marker date="1538738179486" expanded="true" signature="3098:3165" ph="{...}" />
|
||||
<marker date="1538738179486" expanded="true" signature="10852:10860" ph="{...}" />
|
||||
<marker date="1538738179486" expanded="true" signature="10979:10987" ph="{...}" />
|
||||
<marker date="1538738179486" expanded="true" signature="11147:11155" ph="{...}" />
|
||||
<marker date="1538738179486" expanded="true" signature="11251:11259" ph="{...}" />
|
||||
<marker date="1538738179486" expanded="true" signature="11543:11549" ph="{...}" />
|
||||
<marker date="1538738179486" expanded="true" signature="14258:14355" ph="..." />
|
||||
<marker date="1538738179486" expanded="true" signature="14399:14795" ph="{...}" />
|
||||
<marker date="1538738179486" expanded="true" signature="14453:14493" ph="{...}" />
|
||||
<marker date="1538738179486" expanded="true" signature="14545:14585" ph="{...}" />
|
||||
<marker date="1538738179486" expanded="true" signature="14656:14717" ph="{...}" />
|
||||
<marker date="1538738179486" expanded="true" signature="14747:14790" ph="{...}" />
|
||||
<marker date="1538738179486" expanded="true" signature="14914:15224" ph="{...}" />
|
||||
<marker date="1538738179486" expanded="true" signature="15017:15064" ph="{...}" />
|
||||
<marker date="1538738179486" expanded="true" signature="15096:15143" ph="{...}" />
|
||||
<marker date="1538738179486" expanded="true" signature="15175:15222" ph="{...}" />
|
||||
<marker date="1538738179486" expanded="true" signature="15295:15317" ph="(...)" />
|
||||
<marker date="1538738179486" expanded="true" signature="15393:15458" ph="{...}" />
|
||||
<marker date="1538738179486" expanded="true" signature="15499:16401" ph="{...}" />
|
||||
<marker date="1538738179486" expanded="true" signature="15533:15561" ph="{...}" />
|
||||
<marker date="1538738179486" expanded="true" signature="15612:16399" ph="{...}" />
|
||||
<marker date="1538738179486" expanded="true" signature="15640:16394" ph="(...)" />
|
||||
<marker date="1538738179486" expanded="true" signature="15666:16387" ph="(...)" />
|
||||
<marker date="1538738179486" expanded="true" signature="15694:15777" ph="(...)" />
|
||||
<marker date="1538738179486" expanded="true" signature="15723:15766" ph="(...)" />
|
||||
<marker date="1538738179486" expanded="true" signature="15803:16378" ph="(...)" />
|
||||
<marker date="1538738179486" expanded="true" signature="15838:16367" ph="(...)" />
|
||||
<marker date="1538738179486" expanded="true" signature="15924:16138" ph="{...}" />
|
||||
<marker date="1538738179486" expanded="true" signature="16171:16290" ph="{...}" />
|
||||
<marker date="1538738179486" expanded="true" signature="19145:19153" ph="{...}" />
|
||||
<marker date="1538738179486" expanded="true" signature="19251:19259" ph="{...}" />
|
||||
<marker date="1538738179486" expanded="true" signature="19357:19365" ph="{...}" />
|
||||
</folding>
|
||||
</first_editor>
|
||||
<second_editor />
|
||||
</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$/example/ios/Podfile">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="695">
|
||||
<caret line="65" column="52" lean-forward="false" selection-start-line="65" selection-start-column="52" selection-end-line="65" selection-end-column="52" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</component>
|
||||
<component name="masterDetails">
|
||||
<states>
|
||||
|
@ -1,6 +1,6 @@
|
||||
## 0.2.0
|
||||
|
||||
- added support of Chrome CustomTabs for android
|
||||
- added support of Chrome CustomTabs for Android
|
||||
- added support of SFSafariViewController for iOS
|
||||
- added the ability to create multiple instances of browsers
|
||||
|
||||
|
216
README.md
216
README.md
@ -16,11 +16,17 @@ For help on editing plugin code, view the [documentation](https://flutter.io/dev
|
||||
First, add `flutter_inappbrowser` as a [dependency in your pubspec.yaml file](https://flutter.io/using-packages/).
|
||||
|
||||
## Usage
|
||||
Classes:
|
||||
- [InAppBrowser](#inappbrowser): Native WebView.
|
||||
- [ChromeSafariBrowser](#chromesafaribrowser): [Chrome Custom Tabs](https://developer.android.com/reference/android/support/customtabs/package-summary) on Android / [SFSafariViewController](https://developer.apple.com/documentation/safariservices/sfsafariviewcontroller) on iOS.
|
||||
|
||||
Screenshots [here](#screenshots).
|
||||
|
||||
### `InAppBrowser` class
|
||||
Create a Class that extends the `InAppBrowser` Class in order to override the callbacks to manage the browser events.
|
||||
Example:
|
||||
```dart
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:flutter_inappbrowser/flutter_inappbrowser.dart';
|
||||
|
||||
class MyInAppBrowser extends InAppBrowser {
|
||||
@ -107,7 +113,7 @@ class _MyAppState extends State<MyApp> {
|
||||
}
|
||||
```
|
||||
|
||||
### Future\<void\> InAppBrowser.open
|
||||
#### Future\<void\> InAppBrowser.open
|
||||
|
||||
Opens a URL in a new InAppBrowser instance or the system browser.
|
||||
|
||||
@ -188,7 +194,7 @@ inAppBrowser.open('https://flutter.io/', options: {
|
||||
});
|
||||
```
|
||||
|
||||
### Events
|
||||
#### Events
|
||||
|
||||
Event fires when the `InAppBrowser` starts to load an `url`.
|
||||
```dart
|
||||
@ -231,7 +237,7 @@ In order to be able to listen this event, you need to set `useShouldOverrideUrlL
|
||||
}
|
||||
```
|
||||
|
||||
### Future\<void\> InAppBrowser.loadUrl
|
||||
#### Future\<void\> InAppBrowser.loadUrl
|
||||
|
||||
Loads the given `url` with optional `headers` specified as a map from name to value.
|
||||
|
||||
@ -239,7 +245,7 @@ Loads the given `url` with optional `headers` specified as a map from name to va
|
||||
inAppBrowser.loadUrl(String url, {Map<String, String> headers = const {}});
|
||||
```
|
||||
|
||||
### Future\<void\> InAppBrowser.show
|
||||
#### Future\<void\> InAppBrowser.show
|
||||
|
||||
Displays an `InAppBrowser` window that was opened hidden. Calling this has no effect if the `InAppBrowser` was already visible.
|
||||
|
||||
@ -247,7 +253,7 @@ Displays an `InAppBrowser` window that was opened hidden. Calling this has no ef
|
||||
inAppBrowser.show();
|
||||
```
|
||||
|
||||
### Future\<void\> InAppBrowser.hide
|
||||
#### Future\<void\> InAppBrowser.hide
|
||||
|
||||
Hides the `InAppBrowser` window. Calling this has no effect if the `InAppBrowser` was already hidden.
|
||||
|
||||
@ -255,7 +261,7 @@ Hides the `InAppBrowser` window. Calling this has no effect if the `InAppBrowser
|
||||
inAppBrowser.hide();
|
||||
```
|
||||
|
||||
### Future\<void\> InAppBrowser.close
|
||||
#### Future\<void\> InAppBrowser.close
|
||||
|
||||
Closes the `InAppBrowser` window.
|
||||
|
||||
@ -263,7 +269,7 @@ Closes the `InAppBrowser` window.
|
||||
inAppBrowser.close();
|
||||
```
|
||||
|
||||
### Future\<void\> InAppBrowser.reload
|
||||
#### Future\<void\> InAppBrowser.reload
|
||||
|
||||
Reloads the `InAppBrowser` window.
|
||||
|
||||
@ -271,7 +277,7 @@ Reloads the `InAppBrowser` window.
|
||||
inAppBrowser.reload();
|
||||
```
|
||||
|
||||
### Future\<void\> InAppBrowser.goBack
|
||||
#### Future\<void\> InAppBrowser.goBack
|
||||
|
||||
Goes back in the history of the `InAppBrowser` window.
|
||||
|
||||
@ -279,7 +285,7 @@ Goes back in the history of the `InAppBrowser` window.
|
||||
inAppBrowser.goBack();
|
||||
```
|
||||
|
||||
### Future\<void\> InAppBrowser.goForward
|
||||
#### Future\<void\> InAppBrowser.goForward
|
||||
|
||||
Goes forward in the history of the `InAppBrowser` window.
|
||||
|
||||
@ -287,7 +293,7 @@ Goes forward in the history of the `InAppBrowser` window.
|
||||
inAppBrowser.goForward();
|
||||
```
|
||||
|
||||
### Future\<bool\> InAppBrowser.isLoading
|
||||
#### Future\<bool\> InAppBrowser.isLoading
|
||||
|
||||
Check if the Web View of the `InAppBrowser` instance is in a loading state.
|
||||
|
||||
@ -295,7 +301,7 @@ Check if the Web View of the `InAppBrowser` instance is in a loading state.
|
||||
inAppBrowser.isLoading();
|
||||
```
|
||||
|
||||
### Future\<void\> InAppBrowser.stopLoading
|
||||
#### Future\<void\> InAppBrowser.stopLoading
|
||||
|
||||
Stops the Web View of the `InAppBrowser` instance from loading.
|
||||
|
||||
@ -303,7 +309,7 @@ Stops the Web View of the `InAppBrowser` instance from loading.
|
||||
inAppBrowser.stopLoading();
|
||||
```
|
||||
|
||||
### Future\<bool\> InAppBrowser.isHidden
|
||||
#### Future\<bool\> InAppBrowser.isHidden
|
||||
|
||||
Check if the Web View of the `InAppBrowser` instance is hidden.
|
||||
|
||||
@ -311,7 +317,7 @@ Check if the Web View of the `InAppBrowser` instance is hidden.
|
||||
inAppBrowser.isHidden();
|
||||
```
|
||||
|
||||
### Future\<String\> InAppBrowser.injectScriptCode
|
||||
#### Future\<String\> InAppBrowser.injectScriptCode
|
||||
|
||||
Injects JavaScript code into the `InAppBrowser` window and returns the result of the evaluation. (Only available when the target is set to `_blank` or to `_self`)
|
||||
|
||||
@ -319,7 +325,7 @@ Injects JavaScript code into the `InAppBrowser` window and returns the result of
|
||||
inAppBrowser.injectScriptCode(String source);
|
||||
```
|
||||
|
||||
### Future\<void\> InAppBrowser.injectScriptFile
|
||||
#### Future\<void\> InAppBrowser.injectScriptFile
|
||||
|
||||
Injects a JavaScript file into the `InAppBrowser` window. (Only available when the target is set to `_blank` or to `_self`)
|
||||
|
||||
@ -327,7 +333,7 @@ Injects a JavaScript file into the `InAppBrowser` window. (Only available when t
|
||||
inAppBrowser.injectScriptFile(String urlFile);
|
||||
```
|
||||
|
||||
### Future\<void\> InAppBrowser.injectStyleCode
|
||||
#### Future\<void\> InAppBrowser.injectStyleCode
|
||||
|
||||
Injects CSS into the `InAppBrowser` window. (Only available when the target is set to `_blank` or to `_self`)
|
||||
|
||||
@ -335,7 +341,7 @@ Injects CSS into the `InAppBrowser` window. (Only available when the target is s
|
||||
inAppBrowser.injectStyleCode(String source);
|
||||
```
|
||||
|
||||
### Future\<void\> InAppBrowser.injectStyleFile
|
||||
#### Future\<void\> InAppBrowser.injectStyleFile
|
||||
|
||||
Injects a CSS file into the `InAppBrowser` window. (Only available when the target is set to `_blank` or to `_self`)
|
||||
|
||||
@ -343,12 +349,186 @@ Injects a CSS file into the `InAppBrowser` window. (Only available when the targ
|
||||
inAppBrowser.injectStyleFile(String urlFile);
|
||||
```
|
||||
|
||||
### `ChromeSafariBrowser` class
|
||||
Create a Class that extends the `ChromeSafariBrowser` Class in order to override the callbacks to manage the browser events. Example:
|
||||
```dart
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_inappbrowser/flutter_inappbrowser.dart';
|
||||
|
||||
class MyInAppBrowser extends InAppBrowser {
|
||||
|
||||
@override
|
||||
Future onLoadStart(String url) async {
|
||||
print("\n\nStarted $url\n\n");
|
||||
}
|
||||
|
||||
@override
|
||||
Future onLoadStop(String url) async {
|
||||
print("\n\nStopped $url\n\n");
|
||||
}
|
||||
|
||||
@override
|
||||
void onLoadError(String url, int code, String message) {
|
||||
print("\n\nCan't load $url.. Error: $message\n\n");
|
||||
}
|
||||
|
||||
@override
|
||||
void onExit() {
|
||||
print("\n\nBrowser closed!\n\n");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
MyInAppBrowser inAppBrowserFallback = new MyInAppBrowser();
|
||||
|
||||
class MyChromeSafariBrowser extends ChromeSafariBrowser {
|
||||
|
||||
MyChromeSafariBrowser(browserFallback) : super(browserFallback);
|
||||
|
||||
@override
|
||||
void onOpened() {
|
||||
print("ChromeSafari browser opened");
|
||||
}
|
||||
|
||||
@override
|
||||
void onLoaded() {
|
||||
print("ChromeSafari browser loaded");
|
||||
}
|
||||
|
||||
@override
|
||||
void onClosed() {
|
||||
print("ChromeSafari browser closed");
|
||||
}
|
||||
}
|
||||
|
||||
MyChromeSafariBrowser chromeSafariBrowser = new MyChromeSafariBrowser(inAppBrowserFallback);
|
||||
|
||||
|
||||
void main() => runApp(new MyApp());
|
||||
|
||||
class MyApp extends StatefulWidget {
|
||||
@override
|
||||
_MyAppState createState() => new _MyAppState();
|
||||
}
|
||||
|
||||
class _MyAppState extends State<MyApp> {
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return new MaterialApp(
|
||||
home: new Scaffold(
|
||||
appBar: new AppBar(
|
||||
title: const Text('Flutter InAppBrowser Plugin example app'),
|
||||
),
|
||||
body: new Center(
|
||||
child: new RaisedButton(onPressed: () {
|
||||
chromeSafariBrowser.open("https://flutter.io/", options: {
|
||||
"addShareButton": false,
|
||||
"toolbarBackgroundColor": "#000000",
|
||||
"dismissButtonStyle": 1,
|
||||
"preferredBarTintColor": "#000000",
|
||||
},
|
||||
optionsFallback: {
|
||||
"toolbarTopBackgroundColor": "#000000",
|
||||
"closeButtonCaption": "Close"
|
||||
});
|
||||
},
|
||||
child: Text("Open ChromeSafariBrowser")
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
#### Future\<void\> ChromeSafariBrowser.open
|
||||
Opens an `url` in a new `ChromeSafariBrowser` instance or the system browser.
|
||||
|
||||
- `url`: The `url` to load. Call `encodeUriComponent()` on this if the `url` contains Unicode characters.
|
||||
|
||||
- `options`: Options for the `ChromeSafariBrowser`.
|
||||
|
||||
- `headersFallback`: The additional header of the `InAppBrowser` instance fallback to be used in the HTTP request for this URL, specified as a map from name to value.
|
||||
|
||||
- `optionsFallback`: Options used by the `InAppBrowser` instance fallback.
|
||||
|
||||
**Android** supports these options:
|
||||
|
||||
- __addShareButton__: Set to `false` if you don't want the default share button. The default value is `true`.
|
||||
- __showTitle__: Set to `false` if the title shouldn't be shown in the custom tab. The default value is `true`.
|
||||
- __toolbarBackgroundColor__: Set the custom background color of the toolbar.
|
||||
- __enableUrlBarHiding__: Set to `true` to enable the url bar to hide as the user scrolls down on the page. The default value is `false`.
|
||||
- __instantAppsEnabled__: Set to `true` to enable Instant Apps. The default value is `false`.
|
||||
|
||||
**iOS** supports these options:
|
||||
|
||||
- __entersReaderIfAvailable__: Set to `true` if Reader mode should be entered automatically when it is available for the webpage. The default value is `false`.
|
||||
- __barCollapsingEnabled__: Set to `true` to enable bar collapsing. The default value is `false`.
|
||||
- __dismissButtonStyle__: Set the custom style for the dismiss button. The default value is `0 //done`. See [SFSafariViewController.DismissButtonStyle](https://developer.apple.com/documentation/safariservices/sfsafariviewcontroller/dismissbuttonstyle) for all the available styles.
|
||||
- __preferredBarTintColor__: Set the custom background color of the navigation bar and the toolbar.
|
||||
- __preferredControlTintColor__: Set the custom color of the control buttons on the navigation bar and the toolbar.
|
||||
- __presentationStyle__: Set the custom modal presentation style when presenting the WebView. The default value is `0 //fullscreen`. See [UIModalPresentationStyle](https://developer.apple.com/documentation/uikit/uimodalpresentationstyle) for all the available styles.
|
||||
- __transitionStyle__: Set to the custom transition style when presenting the WebView. The default value is `0 //crossDissolve`. See [UIModalTransitionStyle](https://developer.apple.com/documentation/uikit/uimodaltransitionStyle) for all the available styles.
|
||||
|
||||
Example:
|
||||
```dart
|
||||
chromeSafariBrowser.open("https://flutter.io/", options: {
|
||||
"addShareButton": false,
|
||||
"toolbarBackgroundColor": "#000000",
|
||||
"dismissButtonStyle": 1,
|
||||
"preferredBarTintColor": "#000000",
|
||||
});
|
||||
```
|
||||
|
||||
#### Events
|
||||
|
||||
Event fires when the `ChromeSafariBrowser` is opened.
|
||||
```dart
|
||||
@override
|
||||
void onOpened() {
|
||||
|
||||
}
|
||||
```
|
||||
|
||||
Event fires when the `ChromeSafariBrowser` is loaded.
|
||||
```dart
|
||||
@override
|
||||
void onLoaded() {
|
||||
|
||||
}
|
||||
```
|
||||
|
||||
Event fires when the `ChromeSafariBrowser` is closed.
|
||||
```dart
|
||||
@override
|
||||
void onClosed() {
|
||||
|
||||
}
|
||||
```
|
||||
|
||||
## Screenshots:
|
||||
|
||||
#### InAppBrowser
|
||||
iOS:
|
||||
|
||||
![ios](https://user-images.githubusercontent.com/5956938/45934084-2a935400-bf99-11e8-9d71-9e1758b5b8c6.gif)
|
||||
|
||||
Android:
|
||||
|
||||
![android](https://user-images.githubusercontent.com/5956938/45934080-26ffcd00-bf99-11e8-8136-d39a81bd83e7.gif)
|
||||
![android](https://user-images.githubusercontent.com/5956938/45934080-26ffcd00-bf99-11e8-8136-d39a81bd83e7.gif)
|
||||
|
||||
#### ChromeSafariBrowser
|
||||
iOS:
|
||||
|
||||
![ios](https://user-images.githubusercontent.com/5956938/46532148-0c362e00-c8a0-11e8-9a0e-343e049dcf35.gif)
|
||||
|
||||
Android:
|
||||
|
||||
![android](https://user-images.githubusercontent.com/5956938/46532149-0c362e00-c8a0-11e8-8134-9af18f38a746.gif)
|
@ -485,30 +485,32 @@ public class InAppBrowserFlutterPlugin implements MethodCallHandler {
|
||||
|
||||
public static void close(final String uuid) {
|
||||
final WebViewActivity webViewActivity = webViewActivities.get(uuid);
|
||||
registrar.activity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (webViewActivity != null) {
|
||||
registrar.activity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
|
||||
Map<String, Object> obj = new HashMap<>();
|
||||
obj.put("uuid", uuid);
|
||||
channel.invokeMethod("onExit", obj);
|
||||
Map<String, Object> obj = new HashMap<>();
|
||||
obj.put("uuid", uuid);
|
||||
channel.invokeMethod("onExit", obj);
|
||||
|
||||
// The JS protects against multiple calls, so this should happen only when
|
||||
// close() is called by other native code.
|
||||
if (webViewActivity == null)
|
||||
return;
|
||||
// The JS protects against multiple calls, so this should happen only when
|
||||
// close() is called by other native code.
|
||||
if (webViewActivity == null)
|
||||
return;
|
||||
|
||||
webViewActivity.webView.setWebViewClient(new WebViewClient() {
|
||||
// NB: wait for about:blank before dismissing
|
||||
public void onPageFinished(WebView view, String url) {
|
||||
webViewActivity.close();
|
||||
webViewActivity.webView.setWebViewClient(new WebViewClient() {
|
||||
// NB: wait for about:blank before dismissing
|
||||
public void onPageFinished(WebView view, String url) {
|
||||
webViewActivity.close();
|
||||
}
|
||||
});
|
||||
// NB: From SDK 19: "If you call methods on WebView from any thread
|
||||
// other than your app's UI thread, it can cause unexpected results."
|
||||
// http://developer.android.com/guide/webapps/migrating.html#Threads
|
||||
webViewActivity.webView.loadUrl("about:blank");
|
||||
}
|
||||
});
|
||||
// NB: From SDK 19: "If you call methods on WebView from any thread
|
||||
// other than your app's UI thread, it can cause unexpected results."
|
||||
// http://developer.android.com/guide/webapps/migrating.html#Threads
|
||||
webViewActivity.webView.loadUrl("about:blank");
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,22 +1,17 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:flutter_inappbrowser/flutter_inappbrowser.dart';
|
||||
|
||||
class MyInAppBrowser extends InAppBrowser {
|
||||
|
||||
@override
|
||||
Future onLoadStart(String url) async {
|
||||
print("\n\nStarted aaa $url\n\n");
|
||||
inAppBrowserFallback2.open("https://www.google.com", options: {
|
||||
"hidden": true
|
||||
});
|
||||
print("\n\nStarted $url\n\n");
|
||||
//print("\n\n ${await this.isHidden()} \n\n");
|
||||
}
|
||||
|
||||
@override
|
||||
Future onLoadStop(String url) async {
|
||||
print("\n\nStopped aaa $url\n\n");
|
||||
inAppBrowserFallback2.show();
|
||||
print("\n\nStopped $url\n\n");
|
||||
// print(await this.injectScriptCode("document.body.innerHTML"));
|
||||
// print(await this.injectScriptCode("3"));
|
||||
// print(await this.injectScriptCode("""
|
||||
@ -65,40 +60,10 @@ class MyInAppBrowser extends InAppBrowser {
|
||||
}
|
||||
}
|
||||
|
||||
class MyInAppBrowser2 extends InAppBrowser {
|
||||
|
||||
@override
|
||||
Future onLoadStart(String url) async {
|
||||
print("\n\nStarted $url\n\n");
|
||||
//print("\n\n ${await this.isHidden()} \n\n");
|
||||
}
|
||||
|
||||
@override
|
||||
Future onLoadStop(String url) async {
|
||||
print("\n\nStopped $url\n\n");
|
||||
}
|
||||
|
||||
@override
|
||||
void onLoadError(String url, int code, String message) {
|
||||
print("\n\nCan't load $url.. Error: $message\n\n");
|
||||
}
|
||||
|
||||
@override
|
||||
void onExit() {
|
||||
print("\n\nBrowser closed!\n\n");
|
||||
}
|
||||
|
||||
@override
|
||||
void shouldOverrideUrlLoading(String url) {
|
||||
print("\n\n override $url\n\n");
|
||||
this.loadUrl(url);
|
||||
}
|
||||
}
|
||||
|
||||
MyInAppBrowser inAppBrowserFallback = new MyInAppBrowser();
|
||||
MyInAppBrowser2 inAppBrowserFallback2 = new MyInAppBrowser2();
|
||||
|
||||
class MyChromeSafariBrowser extends ChromeSafariBrowser {
|
||||
|
||||
MyChromeSafariBrowser(browserFallback) : super(browserFallback);
|
||||
|
||||
@override
|
||||
@ -114,7 +79,6 @@ class MyChromeSafariBrowser extends ChromeSafariBrowser {
|
||||
@override
|
||||
void onClosed() {
|
||||
print("ChromeSafari browser closed");
|
||||
inAppBrowserFallback.open("https://flutter.io/");
|
||||
}
|
||||
}
|
||||
|
||||
@ -143,20 +107,7 @@ class _MyAppState extends State<MyApp> {
|
||||
),
|
||||
body: new Center(
|
||||
child: new RaisedButton(onPressed: () {
|
||||
chromeSafariBrowser.open("https://flutter.io/", options: {
|
||||
"addShareButton": false,
|
||||
"toolbarBackgroundColor": "#000000",
|
||||
"dismissButtonStyle": 1,
|
||||
"preferredBarTintColor": "#000000",
|
||||
},
|
||||
optionsFallback: {
|
||||
"hidden": true,
|
||||
//"toolbarTopFixedTitle": "Fixed title",
|
||||
//"useShouldOverrideUrlLoading": true
|
||||
//"hideUrlBar": true,
|
||||
//"toolbarTop": false,
|
||||
//"toolbarBottom": false
|
||||
});
|
||||
chromeSafariBrowser.open("https://flutter.io/");
|
||||
// inAppBrowserFallback.open("https://flutter.io/", options: {
|
||||
// //"hidden": true,
|
||||
// //"toolbarTopFixedTitle": "Fixed title",
|
||||
|
@ -15,6 +15,8 @@ public class SafariBrowserOptions: Options {
|
||||
var dismissButtonStyle = 0 //done
|
||||
var preferredBarTintColor = ""
|
||||
var preferredControlTintColor = ""
|
||||
var presentationStyle = 0 //fullscreen
|
||||
var transitionStyle = 0 //crossDissolve
|
||||
|
||||
override init(){
|
||||
super.init()
|
||||
|
@ -34,6 +34,9 @@ class SafariViewController: SFSafariViewController, SFSafariViewControllerDelega
|
||||
self.preferredControlTintColor = color(fromHexString: (safariOptions?.preferredControlTintColor)!)
|
||||
}
|
||||
}
|
||||
|
||||
self.modalPresentationStyle = UIModalPresentationStyle(rawValue: (safariOptions?.presentationStyle)!)!
|
||||
self.modalTransitionStyle = UIModalTransitionStyle(rawValue: (safariOptions?.transitionStyle)!)!
|
||||
}
|
||||
|
||||
func close() {
|
||||
|
@ -303,7 +303,7 @@ class ChromeSafariBrowser {
|
||||
String uuid;
|
||||
InAppBrowser browserFallback;
|
||||
|
||||
///
|
||||
///Initialize the [ChromeSafariBrowser] instance with a [InAppBrowser] fallback instance or `null`.
|
||||
ChromeSafariBrowser (bf) {
|
||||
uuid = uuidGenerator.v4();
|
||||
browserFallback = bf;
|
||||
@ -325,7 +325,33 @@ class ChromeSafariBrowser {
|
||||
return new Future.value("");
|
||||
}
|
||||
|
||||
///Opens an [url] in a new [ChromeSafariBrowser] instance or the system browser.
|
||||
///
|
||||
///- [url]: The [url] to load. Call [encodeUriComponent()] on this if the [url] contains Unicode characters.
|
||||
///
|
||||
///- [options]: Options for the [ChromeSafariBrowser].
|
||||
///
|
||||
///- [headersFallback]: The additional header of the [InAppBrowser] instance fallback to be used in the HTTP request for this URL, specified as a map from name to value.
|
||||
///
|
||||
///- [optionsFallback]: Options used by the [InAppBrowser] instance fallback.
|
||||
///
|
||||
///**Android** supports these options:
|
||||
///
|
||||
///- __addShareButton__: Set to `false` if you don't want the default share button. The default value is `true`.
|
||||
///- __showTitle__: Set to `false` if the title shouldn't be shown in the custom tab. The default value is `true`.
|
||||
///- __toolbarBackgroundColor__: Set the custom background color of the toolbar.
|
||||
///- __enableUrlBarHiding__: Set to `true` to enable the url bar to hide as the user scrolls down on the page. The default value is `false`.
|
||||
///- __instantAppsEnabled__: Set to `true` to enable Instant Apps. The default value is `false`.
|
||||
///
|
||||
///**iOS** supports these options:
|
||||
///
|
||||
///- __entersReaderIfAvailable__: Set to `true` if Reader mode should be entered automatically when it is available for the webpage. The default value is `false`.
|
||||
///- __barCollapsingEnabled__: Set to `true` to enable bar collapsing. The default value is `false`.
|
||||
///- __dismissButtonStyle__: Set the custom style for the dismiss button. The default value is `0 //done`. See [SFSafariViewController.DismissButtonStyle](https://developer.apple.com/documentation/safariservices/sfsafariviewcontroller/dismissbuttonstyle) for all the available styles.
|
||||
///- __preferredBarTintColor__: Set the custom background color of the navigation bar and the toolbar.
|
||||
///- __preferredControlTintColor__: Set the custom color of the control buttons on the navigation bar and the toolbar.
|
||||
///- __presentationStyle__: Set the custom modal presentation style when presenting the WebView. The default value is `0 //fullscreen`. See [UIModalPresentationStyle](https://developer.apple.com/documentation/uikit/uimodalpresentationstyle) for all the available styles.
|
||||
///- __transitionStyle__: Set to the custom transition style when presenting the WebView. The default value is `0 //crossDissolve`. See [UIModalTransitionStyle](https://developer.apple.com/documentation/uikit/uimodaltransitionStyle) for all the available styles.
|
||||
Future<void> open(String url, {Map<String, dynamic> options = const {}, Map<String, String> headersFallback = const {}, Map<String, dynamic> optionsFallback = const {}}) async {
|
||||
Map<String, dynamic> args = <String, dynamic>{};
|
||||
args.putIfAbsent('uuid', () => uuid);
|
||||
|
Loading…
x
Reference in New Issue
Block a user