diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 354f7a5ae51b31970a14d67bf7a435dee07a686c..63418becb4ec6872ba64f1eddbac50f186539172 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -15,36 +15,8 @@ </component> <component name="ChangeListManager"> <list default="true" id="9b41f7a2-a71e-4923-91fb-249d7815b3e7" name="Default" comment=""> - <change afterPath="$PROJECT_DIR$/android/src/main/java/com/pichillilorenzo/flutter_inappbrowser/FlutterWebView.java" afterDir="false" /> - <change afterPath="$PROJECT_DIR$/ios/Classes/InAppWebViewOptions.swift" afterDir="false" /> - <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" /> - <change beforePath="$PROJECT_DIR$/CHANGELOG.md" beforeDir="false" afterPath="$PROJECT_DIR$/CHANGELOG.md" afterDir="false" /> <change beforePath="$PROJECT_DIR$/README.md" beforeDir="false" afterPath="$PROJECT_DIR$/README.md" afterDir="false" /> - <change beforePath="$PROJECT_DIR$/android/src/main/AndroidManifest.xml" beforeDir="false" afterPath="$PROJECT_DIR$/android/src/main/AndroidManifest.xml" afterDir="false" /> - <change beforePath="$PROJECT_DIR$/android/src/main/java/com/pichillilorenzo/flutter_inappbrowser/InAppBrowserFlutterPlugin.java" beforeDir="false" afterPath="$PROJECT_DIR$/android/src/main/java/com/pichillilorenzo/flutter_inappbrowser/InAppBrowserFlutterPlugin.java" afterDir="false" /> - <change beforePath="$PROJECT_DIR$/android/src/main/java/com/pichillilorenzo/flutter_inappbrowser/InAppBrowserOptions.java" beforeDir="false" afterPath="$PROJECT_DIR$/android/src/main/java/com/pichillilorenzo/flutter_inappbrowser/InAppBrowserOptions.java" afterDir="false" /> - <change beforePath="$PROJECT_DIR$/android/src/main/java/com/pichillilorenzo/flutter_inappbrowser/InAppBrowserWebChromeClient.java" beforeDir="false" /> - <change beforePath="$PROJECT_DIR$/android/src/main/java/com/pichillilorenzo/flutter_inappbrowser/InAppBrowserWebViewClient.java" beforeDir="false" /> - <change beforePath="$PROJECT_DIR$/android/src/main/java/com/pichillilorenzo/flutter_inappbrowser/JavaScriptBridgeInterface.java" beforeDir="false" afterPath="$PROJECT_DIR$/android/src/main/java/com/pichillilorenzo/flutter_inappbrowser/JavaScriptBridgeInterface.java" afterDir="false" /> - <change beforePath="$PROJECT_DIR$/android/src/main/java/com/pichillilorenzo/flutter_inappbrowser/Options.java" beforeDir="false" afterPath="$PROJECT_DIR$/android/src/main/java/com/pichillilorenzo/flutter_inappbrowser/Options.java" afterDir="false" /> - <change beforePath="$PROJECT_DIR$/android/src/main/java/com/pichillilorenzo/flutter_inappbrowser/WebViewActivity.java" beforeDir="false" afterPath="$PROJECT_DIR$/android/src/main/java/com/pichillilorenzo/flutter_inappbrowser/InAppBrowserActivity.java" afterDir="false" /> - <change beforePath="$PROJECT_DIR$/android/src/main/java/com/pichillilorenzo/flutter_inappbrowser/chrome_custom_tabs/ChromeCustomTabsActivity.java" beforeDir="false" /> - <change beforePath="$PROJECT_DIR$/android/src/main/java/com/pichillilorenzo/flutter_inappbrowser/chrome_custom_tabs/ChromeCustomTabsOptions.java" beforeDir="false" /> - <change beforePath="$PROJECT_DIR$/android/src/main/java/com/pichillilorenzo/flutter_inappbrowser/chrome_custom_tabs/CustomTabActivityHelper.java" beforeDir="false" /> - <change beforePath="$PROJECT_DIR$/android/src/main/java/com/pichillilorenzo/flutter_inappbrowser/chrome_custom_tabs/CustomTabsHelper.java" beforeDir="false" /> - <change beforePath="$PROJECT_DIR$/android/src/main/java/com/pichillilorenzo/flutter_inappbrowser/chrome_custom_tabs/KeepAliveService.java" beforeDir="false" /> - <change beforePath="$PROJECT_DIR$/android/src/main/java/com/pichillilorenzo/flutter_inappbrowser/chrome_custom_tabs/ServiceConnection.java" beforeDir="false" /> - <change beforePath="$PROJECT_DIR$/android/src/main/java/com/pichillilorenzo/flutter_inappbrowser/chrome_custom_tabs/ServiceConnectionCallback.java" beforeDir="false" /> - <change beforePath="$PROJECT_DIR$/android/src/main/res/layout/activity_web_view.xml" beforeDir="false" afterPath="$PROJECT_DIR$/android/src/main/res/layout/activity_web_view.xml" afterDir="false" /> - <change beforePath="$PROJECT_DIR$/android/src/main/res/menu/menu_main.xml" beforeDir="false" afterPath="$PROJECT_DIR$/android/src/main/res/menu/menu_main.xml" afterDir="false" /> - <change beforePath="$PROJECT_DIR$/example/lib/main.dart" beforeDir="false" afterPath="$PROJECT_DIR$/example/lib/main.dart" afterDir="false" /> - <change beforePath="$PROJECT_DIR$/flutter_inappbrowser.iml" beforeDir="false" afterPath="$PROJECT_DIR$/flutter_inappbrowser.iml" afterDir="false" /> - <change beforePath="$PROJECT_DIR$/ios/Classes/InAppBrowserOptions.swift" beforeDir="false" afterPath="$PROJECT_DIR$/ios/Classes/InAppBrowserOptions.swift" afterDir="false" /> - <change beforePath="$PROJECT_DIR$/ios/Classes/InAppBrowserWebViewController.swift" beforeDir="false" afterPath="$PROJECT_DIR$/ios/Classes/InAppBrowserWebViewController.swift" afterDir="false" /> - <change beforePath="$PROJECT_DIR$/ios/Classes/SwiftFlutterPlugin.swift" beforeDir="false" afterPath="$PROJECT_DIR$/ios/Classes/SwiftFlutterPlugin.swift" afterDir="false" /> - <change beforePath="$PROJECT_DIR$/ios/Storyboards/WebView.storyboard" beforeDir="false" afterPath="$PROJECT_DIR$/ios/Storyboards/WebView.storyboard" afterDir="false" /> <change beforePath="$PROJECT_DIR$/lib/flutter_inappbrowser.dart" beforeDir="false" afterPath="$PROJECT_DIR$/lib/flutter_inappbrowser.dart" afterDir="false" /> - <change beforePath="$PROJECT_DIR$/pubspec.yaml" beforeDir="false" afterPath="$PROJECT_DIR$/pubspec.yaml" afterDir="false" /> </list> <ignored path="$PROJECT_DIR$/.dart_tool/" /> <ignored path="$PROJECT_DIR$/.idea/" /> @@ -64,8 +36,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="133"> - <caret line="500" column="57" selection-start-line="500" selection-start-column="57" selection-end-line="500" selection-end-column="57" /> + <state relative-caret-position="181"> + <caret line="506" column="20" selection-start-line="506" selection-start-column="7" selection-end-line="506" selection-end-column="20" /> <folding> <element signature="e#814#831#0" expanded="true" /> </folding> @@ -89,8 +61,8 @@ <entry file="file://$PROJECT_DIR$/README.md"> <provider selected="true" editor-type-id="split-provider[text-editor;MarkdownPreviewEditor]"> <state split_layout="SPLIT"> - <first_editor relative-caret-position="120"> - <caret line="8" column="91" selection-start-line="8" selection-start-column="91" selection-end-line="8" selection-end-column="91" /> + <first_editor relative-caret-position="142"> + <caret line="623" column="31" selection-start-line="623" selection-start-column="31" selection-end-line="623" selection-end-column="31" /> </first_editor> <second_editor> <markdownNavigatorState /> @@ -116,8 +88,8 @@ <file leaf-file-name="pubspec.yaml" pinned="false" current-in-tab="false"> <entry file="file://$PROJECT_DIR$/pubspec.yaml"> <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="45"> - <caret line="3" column="52" lean-forward="true" selection-start-line="3" selection-start-column="52" selection-end-line="3" selection-end-column="52" /> + <state relative-caret-position="15"> + <caret line="1" column="103" lean-forward="true" selection-start-line="1" selection-start-column="13" selection-end-line="1" selection-end-column="103" /> </state> </provider> </entry> @@ -133,7 +105,6 @@ </component> <component name="FindInProjectRecents"> <findStrings> - <find>isHi</find> <find>isHidde</find> <find>onWebViewCreated</find> <find>WebViewCreatedCallback</find> @@ -163,6 +134,7 @@ <find>InAppLocalhostServer</find> <find>local</find> <find>openWithSystemBrowser</find> + <find>__userAgent__</find> </findStrings> <replaceStrings> <replace>activity.getPreferences(0)</replace> @@ -206,8 +178,8 @@ <option value="$PROJECT_DIR$/example/pubspec.yaml" /> <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$/pubspec.yaml" /> + <option value="$PROJECT_DIR$/lib/flutter_inappbrowser.dart" /> <option value="$PROJECT_DIR$/README.md" /> </list> </option> @@ -699,13 +671,20 @@ </state> </provider> </entry> - <entry file="file://$PROJECT_DIR$/lib/flutter_inappbrowser.dart"> - <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="133"> - <caret line="500" column="57" selection-start-line="500" selection-start-column="57" selection-end-line="500" selection-end-column="57" /> - <folding> - <element signature="e#814#831#0" expanded="true" /> - </folding> + <entry file="file://$PROJECT_DIR$/CHANGELOG.md"> + <provider selected="true" editor-type-id="split-provider[text-editor;MarkdownPreviewEditor]"> + <state split_layout="SPLIT"> + <first_editor relative-caret-position="390"> + <caret line="26" column="34" selection-start-line="26" selection-start-column="34" selection-end-line="26" selection-end-column="34" /> + </first_editor> + <second_editor> + <markdownNavigatorState /> + </second_editor> + </state> + </provider> + <provider editor-type-id="text-editor"> + <state relative-caret-position="30"> + <caret line="2" column="69" lean-forward="true" selection-start-line="2" selection-start-column="2" selection-end-line="2" selection-end-column="73" /> </state> </provider> </entry> @@ -721,33 +700,26 @@ </entry> <entry file="file://$PROJECT_DIR$/pubspec.yaml"> <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="45"> - <caret line="3" column="52" lean-forward="true" selection-start-line="3" selection-start-column="52" selection-end-line="3" selection-end-column="52" /> + <state relative-caret-position="15"> + <caret line="1" column="103" lean-forward="true" selection-start-line="1" selection-start-column="13" selection-end-line="1" selection-end-column="103" /> </state> </provider> </entry> - <entry file="file://$PROJECT_DIR$/CHANGELOG.md"> - <provider selected="true" editor-type-id="split-provider[text-editor;MarkdownPreviewEditor]"> - <state split_layout="SPLIT"> - <first_editor relative-caret-position="390"> - <caret line="26" column="34" selection-start-line="26" selection-start-column="34" selection-end-line="26" selection-end-column="34" /> - </first_editor> - <second_editor> - <markdownNavigatorState /> - </second_editor> - </state> - </provider> - <provider editor-type-id="text-editor"> - <state relative-caret-position="30"> - <caret line="2" column="69" lean-forward="true" selection-start-line="2" selection-start-column="2" selection-end-line="2" selection-end-column="73" /> + <entry file="file://$PROJECT_DIR$/lib/flutter_inappbrowser.dart"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="181"> + <caret line="506" column="20" selection-start-line="506" selection-start-column="7" selection-end-line="506" selection-end-column="20" /> + <folding> + <element signature="e#814#831#0" expanded="true" /> + </folding> </state> </provider> </entry> <entry file="file://$PROJECT_DIR$/README.md"> <provider selected="true" editor-type-id="split-provider[text-editor;MarkdownPreviewEditor]"> <state split_layout="SPLIT"> - <first_editor relative-caret-position="120"> - <caret line="8" column="91" selection-start-line="8" selection-start-column="91" selection-end-line="8" selection-end-column="91" /> + <first_editor relative-caret-position="142"> + <caret line="623" column="31" selection-start-line="623" selection-start-column="31" selection-end-line="623" selection-end-column="31" /> </first_editor> <second_editor> <markdownNavigatorState /> diff --git a/README.md b/README.md index ecddaba18836dc4815e6cdcf75908740a33a79ed..67b132dece8df2c4d512ab5c6cd7ef5dd3455f1d 100644 --- a/README.md +++ b/README.md @@ -195,7 +195,7 @@ All platforms support: - __useShouldOverrideUrlLoading__: Set to `true` to be able to listen at the `shouldOverrideUrlLoading()` event. The default value is `false`. - __useOnLoadResource__: Set to `true` to be able to listen at the `onLoadResource()` event. The default value is `false`. - __clearCache__: Set to `true` to have all the browser's cache cleared before the new window is opened. The default value is `false`. - - __userAgent___: Set the custom WebView's user-agent. + - __userAgent__: Set the custom WebView's user-agent. - __javaScriptEnabled__: Set to `true` to enable JavaScript. The default value is `true`. - __javaScriptCanOpenWindowsAutomatically__: Set to `true` to allow JavaScript open windows without user interaction. The default value is `false`. - __mediaPlaybackRequiresUserGesture__: Set to `true` to prevent HTML5 audio or video from autoplaying. The default value is `true`. @@ -623,7 +623,7 @@ Opens an `url` in a new `InAppBrowser` instance. - __useShouldOverrideUrlLoading__: Set to `true` to be able to listen at the `shouldOverrideUrlLoading()` event. The default value is `false`. - __useOnLoadResource__: Set to `true` to be able to listen at the `onLoadResource()` event. The default value is `false`. - __clearCache__: Set to `true` to have all the browser's cache cleared before the new window is opened. The default value is `false`. - - __userAgent___: Set the custom WebView's user-agent. + - __userAgent__: Set the custom WebView's user-agent. - __javaScriptEnabled__: Set to `true` to enable JavaScript. The default value is `true`. - __javaScriptCanOpenWindowsAutomatically__: Set to `true` to allow JavaScript open windows without user interaction. The default value is `false`. - __hidden__: Set to `true` to create the browser and load the page, but not show it. The `onLoadStop` event fires when loading is complete. Omit or set to `false` (default) to have the browser open and load normally. diff --git a/lib/flutter_inappbrowser.dart b/lib/flutter_inappbrowser.dart index 6256ed151882a349974a21a2207c5266c5eaeac5..22d4156502ee55ffa17e46ce5bcde702c25b3e49 100644 --- a/lib/flutter_inappbrowser.dart +++ b/lib/flutter_inappbrowser.dart @@ -147,7 +147,7 @@ class InAppBrowser { /// - __useShouldOverrideUrlLoading__: Set to `true` to be able to listen at the [shouldOverrideUrlLoading()] event. The default value is `false`. /// - __useOnLoadResource__: Set to `true` to be able to listen at the [onLoadResource()] event. The default value is `false`. /// - __clearCache__: Set to `true` to have all the browser's cache cleared before the new window is opened. The default value is `false`. - /// - __userAgent___: Set the custom WebView's user-agent. + /// - __userAgent__: Set the custom WebView's user-agent. /// - __javaScriptEnabled__: Set to `true` to enable JavaScript. The default value is `true`. /// - __javaScriptCanOpenWindowsAutomatically__: Set to `true` to allow JavaScript open windows without user interaction. The default value is `false`. /// - __hidden__: Set to `true` to create the browser and load the page, but not show it. The `onLoadStop` event fires when loading is complete. Omit or set to `false` (default) to have the browser open and load normally. @@ -504,7 +504,7 @@ typedef void onWebViewLoadResourceCallback(InAppWebViewController controller, We /// - __useShouldOverrideUrlLoading__: Set to `true` to be able to listen at the [InAppWebView.shouldOverrideUrlLoading()] event. The default value is `false`. /// - __useOnLoadResource__: Set to `true` to be able to listen at the [InAppWebView.onLoadResource()] event. The default value is `false`. /// - __clearCache__: Set to `true` to have all the browser's cache cleared before the new window is opened. The default value is `false`. -/// - __userAgent___: Set the custom WebView's user-agent. +/// - __userAgent__: Set the custom WebView's user-agent. /// - __javaScriptEnabled__: Set to `true` to enable JavaScript. The default value is `true`. /// - __javaScriptCanOpenWindowsAutomatically__: Set to `true` to allow JavaScript open windows without user interaction. The default value is `false`. /// - __mediaPlaybackRequiresUserGesture__: Set to `true` to prevent HTML5 audio or video from autoplaying. The default value is `true`.