updated webview options classes, fixed debuggingEnabled, added getTRexRunnerHtml and getTRexRunnerCss methods
This commit is contained in:
parent
299042f828
commit
2811fce463
5
.idea/codeStyles/codeStyleConfig.xml
generated
Normal file
5
.idea/codeStyles/codeStyleConfig.xml
generated
Normal file
@ -0,0 +1,5 @@
|
||||
<component name="ProjectCodeStyleConfiguration">
|
||||
<state>
|
||||
<option name="PREFERRED_PROJECT_CODE_STYLE" value="Default" />
|
||||
</state>
|
||||
</component>
|
@ -1,5 +1,6 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="example/lib/main.dart" type="FlutterRunConfigurationType" factoryName="Flutter" singleton="false">
|
||||
<option name="additionalArgs" value="--debug" />
|
||||
<option name="filePath" value="$PROJECT_DIR$/example/lib/main.dart" />
|
||||
<method v="2" />
|
||||
</configuration>
|
||||
|
633
.idea/workspace.xml
generated
633
.idea/workspace.xml
generated
@ -15,38 +15,32 @@
|
||||
</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/InAppBrowser.java" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/example/assets/favicon.ico" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/.idea/codeStyles/codeStyleConfig.xml" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/lib/t_rex_runner/t-rex.css" 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$/android/build.gradle" beforeDir="false" afterPath="$PROJECT_DIR$/android/build.gradle" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/android/gradle.properties" beforeDir="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/ChromeCustomTabs/ChromeCustomTabsActivity.java" beforeDir="false" afterPath="$PROJECT_DIR$/android/src/main/java/com/pichillilorenzo/flutter_inappbrowser/ChromeCustomTabs/ChromeCustomTabsActivity.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/android/src/main/java/com/pichillilorenzo/flutter_inappbrowser/ContentBlocker/ContentBlockerHandler.java" beforeDir="false" afterPath="$PROJECT_DIR$/android/src/main/java/com/pichillilorenzo/flutter_inappbrowser/ContentBlocker/ContentBlockerHandler.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/android/src/main/java/com/pichillilorenzo/flutter_inappbrowser/CredentialDatabaseHandler.java" beforeDir="false" afterPath="$PROJECT_DIR$/android/src/main/java/com/pichillilorenzo/flutter_inappbrowser/CredentialDatabaseHandler.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/android/src/main/java/com/pichillilorenzo/flutter_inappbrowser/FlutterWebView.java" beforeDir="false" afterPath="$PROJECT_DIR$/android/src/main/java/com/pichillilorenzo/flutter_inappbrowser/FlutterWebView.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/android/src/main/java/com/pichillilorenzo/flutter_inappbrowser/InAppBrowserActivity.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/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/InAppWebView/InAppWebChromeClient.java" beforeDir="false" afterPath="$PROJECT_DIR$/android/src/main/java/com/pichillilorenzo/flutter_inappbrowser/InAppWebView/InAppWebChromeClient.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/android/src/main/java/com/pichillilorenzo/flutter_inappbrowser/InAppWebView/InAppWebView.java" beforeDir="false" afterPath="$PROJECT_DIR$/android/src/main/java/com/pichillilorenzo/flutter_inappbrowser/InAppWebView/InAppWebView.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/android/src/main/java/com/pichillilorenzo/flutter_inappbrowser/InAppWebView/InAppWebViewClient.java" beforeDir="false" afterPath="$PROJECT_DIR$/android/src/main/java/com/pichillilorenzo/flutter_inappbrowser/InAppWebView/InAppWebViewClient.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/android/src/main/java/com/pichillilorenzo/flutter_inappbrowser/InAppWebView/InAppWebViewOptions.java" beforeDir="false" afterPath="$PROJECT_DIR$/android/src/main/java/com/pichillilorenzo/flutter_inappbrowser/InAppWebView/InAppWebViewOptions.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/android/src/main/java/com/pichillilorenzo/flutter_inappbrowser/InAppWebView/InputAwareWebView.java" beforeDir="false" afterPath="$PROJECT_DIR$/android/src/main/java/com/pichillilorenzo/flutter_inappbrowser/InAppWebView/InputAwareWebView.java" afterDir="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/MyCookieManager.java" beforeDir="false" afterPath="$PROJECT_DIR$/android/src/main/java/com/pichillilorenzo/flutter_inappbrowser/MyCookieManager.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/android/src/main/java/com/pichillilorenzo/flutter_inappbrowser/Util.java" beforeDir="false" afterPath="$PROJECT_DIR$/android/src/main/java/com/pichillilorenzo/flutter_inappbrowser/Util.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/example/android/gradle.properties" beforeDir="false" afterPath="$PROJECT_DIR$/example/android/gradle.properties" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/example/assets/index.html" beforeDir="false" afterPath="$PROJECT_DIR$/example/assets/index.html" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/example/ios/Flutter/flutter_export_environment.sh" beforeDir="false" afterPath="$PROJECT_DIR$/example/ios/Flutter/flutter_export_environment.sh" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/example/ios/Podfile" beforeDir="false" afterPath="$PROJECT_DIR$/example/ios/Podfile" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/example/ios/Runner.xcodeproj/project.pbxproj" beforeDir="false" afterPath="$PROJECT_DIR$/example/ios/Runner.xcodeproj/project.pbxproj" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/example/lib/chrome_safari_example.screen.dart" beforeDir="false" afterPath="$PROJECT_DIR$/example/lib/chrome_safari_example.screen.dart" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/example/lib/inline_example.screen.dart" beforeDir="false" afterPath="$PROJECT_DIR$/example/lib/inline_example.screen.dart" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/example/lib/test.dart" beforeDir="false" afterPath="$PROJECT_DIR$/example/lib/test.dart" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/example/lib/webview_example.screen.dart" beforeDir="false" afterPath="$PROJECT_DIR$/example/lib/webview_example.screen.dart" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/example/pubspec.yaml" beforeDir="false" afterPath="$PROJECT_DIR$/example/pubspec.yaml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/ios/Classes/CustomeSchemeHandler.swift" beforeDir="false" afterPath="$PROJECT_DIR$/ios/Classes/CustomeSchemeHandler.swift" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/ios/Classes/FlutterWebViewController.swift" beforeDir="false" afterPath="$PROJECT_DIR$/ios/Classes/FlutterWebViewController.swift" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/ios/Classes/InAppWebView.swift" beforeDir="false" afterPath="$PROJECT_DIR$/ios/Classes/InAppWebView.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/flutter_inappbrowser.podspec" beforeDir="false" afterPath="$PROJECT_DIR$/ios/flutter_inappbrowser.podspec" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/lib/src/chrome_safari_browser.dart" beforeDir="false" afterPath="$PROJECT_DIR$/lib/src/chrome_safari_browser.dart" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/lib/src/content_blocker.dart" beforeDir="false" afterPath="$PROJECT_DIR$/lib/src/content_blocker.dart" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/lib/src/in_app_browser.dart" beforeDir="false" afterPath="$PROJECT_DIR$/lib/src/in_app_browser.dart" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/lib/src/in_app_localhost_server.dart" beforeDir="false" afterPath="$PROJECT_DIR$/lib/src/in_app_localhost_server.dart" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/lib/src/in_app_webview.dart" beforeDir="false" afterPath="$PROJECT_DIR$/lib/src/in_app_webview.dart" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/lib/src/types.dart" beforeDir="false" afterPath="$PROJECT_DIR$/lib/src/types.dart" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/lib/src/webview_options.dart" beforeDir="false" afterPath="$PROJECT_DIR$/lib/src/webview_options.dart" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/nodejs_server_test_auth_basic_and_ssl/index.js" beforeDir="false" afterPath="$PROJECT_DIR$/nodejs_server_test_auth_basic_and_ssl/index.js" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/pubspec.yaml" beforeDir="false" afterPath="$PROJECT_DIR$/pubspec.yaml" afterDir="false" />
|
||||
@ -69,29 +63,11 @@
|
||||
<component name="ExecutionTargetManager" SELECTED_TARGET="Pixel_3_XL_API_24" />
|
||||
<component name="FileEditorManager">
|
||||
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
|
||||
<file pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/CHANGELOG.md">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="336">
|
||||
<caret line="28" column="24" selection-start-line="28" selection-start-column="24" selection-end-line="28" selection-end-column="24" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/nodejs_server_test_auth_basic_and_ssl/index.js">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="423">
|
||||
<caret line="49" column="46" selection-start-line="49" selection-start-column="46" selection-end-line="49" selection-end-column="46" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/lib/src/in_app_webview.dart">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="183">
|
||||
<caret line="114" column="101" selection-start-line="114" selection-start-column="87" selection-end-line="114" selection-end-column="101" />
|
||||
<state relative-caret-position="251">
|
||||
<caret line="265" column="89" selection-start-line="261" selection-start-column="4" selection-end-line="265" selection-end-column="89" />
|
||||
<folding>
|
||||
<element signature="e#0#17#0" expanded="true" />
|
||||
</folding>
|
||||
@ -100,42 +76,33 @@
|
||||
</entry>
|
||||
</file>
|
||||
<file pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/lib/src/webview_options.dart">
|
||||
<entry file="file://$PROJECT_DIR$/example/lib/inline_example.screen.dart">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="142">
|
||||
<caret line="57" column="24" selection-start-line="57" selection-start-column="7" selection-end-line="57" selection-end-column="24" />
|
||||
<state relative-caret-position="28">
|
||||
<caret line="94" column="32" selection-start-line="94" selection-start-column="16" selection-end-line="94" selection-end-column="32" />
|
||||
<folding>
|
||||
<element signature="e#0#17#0" expanded="true" />
|
||||
<element signature="e#0#20#0" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/example/assets/index.html">
|
||||
<entry file="file://$PROJECT_DIR$/example/pubspec.yaml">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="888">
|
||||
<caret line="79" column="11" selection-start-line="79" selection-start-column="11" selection-end-line="79" selection-end-column="11" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file 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="-107">
|
||||
<caret line="8" column="36" selection-start-line="8" selection-start-column="36" selection-end-line="8" selection-end-column="36" />
|
||||
<state relative-caret-position="131">
|
||||
<caret line="24" column="27" selection-start-line="24" selection-start-column="27" selection-end-line="24" selection-end-column="27" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file pinned="false" current-in-tab="true">
|
||||
<entry file="file://$PROJECT_DIR$/example/lib/inline_example.screen.dart">
|
||||
<entry file="file://$PROJECT_DIR$/lib/src/webview_options.dart">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="294">
|
||||
<caret line="261" column="187" selection-start-line="259" selection-start-column="14" selection-end-line="261" selection-end-column="187" />
|
||||
<state relative-caret-position="364">
|
||||
<caret line="81" column="43" selection-start-line="81" selection-start-column="43" selection-end-line="81" selection-end-column="43" />
|
||||
<folding>
|
||||
<element signature="e#0#20#0" expanded="true" />
|
||||
<element signature="e#0#17#0" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
@ -153,36 +120,36 @@
|
||||
</component>
|
||||
<component name="FindInProjectRecents">
|
||||
<findStrings>
|
||||
<find>CER</find>
|
||||
<find>ServerTrustChallenge</find>
|
||||
<find>cONTENTMODE</find>
|
||||
<find>iOSInAppWebViewUserPreferredContentMode</find>
|
||||
<find>InAppWebViewUserPreferredContentMode</find>
|
||||
<find>serverCertificate</find>
|
||||
<find>onReceivedHttpAuthRequest</find>
|
||||
<find>preferredContentMode</find>
|
||||
<find>print</find>
|
||||
<find>ConsoleMessageLevel</find>
|
||||
<find>onConsoleMessage</find>
|
||||
<find>_findLocalPath</find>
|
||||
<find>package</find>
|
||||
<find>on</find>
|
||||
<find>findAll</find>
|
||||
<find>getFave</find>
|
||||
<find>Uri</find>
|
||||
<find>!= "an</find>
|
||||
<find>_channel</find>
|
||||
<find>getHtml</find>
|
||||
<find>url</find>
|
||||
<find>toggleErrorInformationPopup</find>
|
||||
<find>error-information-popup-container</find>
|
||||
<find>offline-spri</find>
|
||||
<find>sprite</find>
|
||||
<find>icon-offline</find>
|
||||
<find>ICON</find>
|
||||
<find>loadImages</find>
|
||||
<find>RESOURCE_TEMPLATE_ID</find>
|
||||
<find>adjustDimensions</find>
|
||||
<find>outerContainerEl</find>
|
||||
<find>ontouch</find>
|
||||
<find>fromVa</find>
|
||||
<find>ContentBlockerActionType</find>
|
||||
<find>getOptions</find>
|
||||
<find>gestureR</find>
|
||||
<find>_dispose</find>
|
||||
<find>dispose</find>
|
||||
<find>Long</find>
|
||||
<find>custom</find>
|
||||
<find>scheme</find>
|
||||
<find>useOnLoadResource</find>
|
||||
<find>useShouldOverrideUrlLoading</find>
|
||||
<find>iOS</find>
|
||||
<find>Ios</find>
|
||||
<find>initialOptions</find>
|
||||
<find>initialOpti</find>
|
||||
<find>Platform</find>
|
||||
<find>Platform.i</find>
|
||||
<find>getOption</find>
|
||||
<find>.toValue</find>
|
||||
<find>fromValue(</find>
|
||||
<find>?.toMap());</find>
|
||||
<find>fromMap</find>
|
||||
<find>setOptions</find>
|
||||
<find>fromValue</find>
|
||||
<find>List<</find>
|
||||
<find>debuggingEnabled</find>
|
||||
<find>initialOp</find>
|
||||
</findStrings>
|
||||
<replaceStrings>
|
||||
<replace>activity.getPreferences(0)</replace>
|
||||
@ -192,10 +159,12 @@
|
||||
<replace>throwIsNotOpened</replace>
|
||||
<replace>ChannelManager</replace>
|
||||
<replace>Function</replace>
|
||||
<replace>?.toMap() ?? {});</replace>
|
||||
</replaceStrings>
|
||||
<dirStrings>
|
||||
<dir>$PROJECT_DIR$/example/android</dir>
|
||||
<dir>$PROJECT_DIR$/lib/src</dir>
|
||||
<dir>$PROJECT_DIR$/lib</dir>
|
||||
</dirStrings>
|
||||
</component>
|
||||
<component name="Git.Settings">
|
||||
@ -204,11 +173,6 @@
|
||||
<component name="IdeDocumentHistory">
|
||||
<option name="CHANGED_PATHS">
|
||||
<list>
|
||||
<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/settings.gradle" />
|
||||
<option value="$PROJECT_DIR$/ios/Classes/InAppBrowser.m" />
|
||||
<option value="$PROJECT_DIR$/ios/Classes/SwiftFlutterPlugin.swift" />
|
||||
<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/InAppBrowserClient.java" />
|
||||
@ -231,30 +195,35 @@
|
||||
<option value="$PROJECT_DIR$/lib/in_app_browser.dart" />
|
||||
<option value="$PROJECT_DIR$/lib/src/in_app_localhost_server.dart" />
|
||||
<option value="$PROJECT_DIR$/lib/src/web_history.dart" />
|
||||
<option value="$PROJECT_DIR$/example/lib/test.dart" />
|
||||
<option value="$PROJECT_DIR$/lib/src/chrome_safari_browser.dart" />
|
||||
<option value="$PROJECT_DIR$/example/ios/Runner/Info.plist" />
|
||||
<option value="$PROJECT_DIR$/example/lib/main.dart" />
|
||||
<option value="$PROJECT_DIR$/lib/src/content_blocker.dart" />
|
||||
<option value="$PROJECT_DIR$/example/lib/webview_example.screen.dart" />
|
||||
<option value="$PROJECT_DIR$/lib/src/credentials_database.dart" />
|
||||
<option value="$PROJECT_DIR$/lib/flutter_inappbrowser.dart" />
|
||||
<option value="$PROJECT_DIR$/ios/flutter_inappbrowser.podspec" />
|
||||
<option value="$PROJECT_DIR$/lib/src/channel_manager.dart" />
|
||||
<option value="$PROJECT_DIR$/lib/src/cookie_manager.dart" />
|
||||
<option value="$PROJECT_DIR$/lib/src/http_auth_credentials_database.dart" />
|
||||
<option value="$PROJECT_DIR$/example/lib/chrome_safari_example.screen.dart" />
|
||||
<option value="$PROJECT_DIR$/lib/src/types.dart" />
|
||||
<option value="$PROJECT_DIR$/CHANGELOG.md" />
|
||||
<option value="$PROJECT_DIR$/lib/src/in_app_browser.dart" />
|
||||
<option value="$PROJECT_DIR$/android/build.gradle" />
|
||||
<option value="$PROJECT_DIR$/example/pubspec.yaml" />
|
||||
<option value="$PROJECT_DIR$/pubspec.yaml" />
|
||||
<option value="$PROJECT_DIR$/lib/src/in_app_webview.dart" />
|
||||
<option value="$PROJECT_DIR$/example/assets/index.html" />
|
||||
<option value="$PROJECT_DIR$/nodejs_server_test_auth_basic_and_ssl/index.js" />
|
||||
<option value="$PROJECT_DIR$/lib/src/webview_options.dart" />
|
||||
<option value="$PROJECT_DIR$/example/assets/index.html" />
|
||||
<option value="$PROJECT_DIR$/lib/t_rex_runner/index.js" />
|
||||
<option value="$PROJECT_DIR$/lib/t_rex_runner/index.css" />
|
||||
<option value="$PROJECT_DIR$/lib/t_rex_runner/index.html" />
|
||||
<option value="$PROJECT_DIR$/lib/t_rex_runner/t-rex.html" />
|
||||
<option value="$PROJECT_DIR$/pubspec.yaml" />
|
||||
<option value="$PROJECT_DIR$/lib/t_rex_runner/t-rex.css" />
|
||||
<option value="$PROJECT_DIR$/CHANGELOG.md" />
|
||||
<option value="$PROJECT_DIR$/example/lib/test.dart" />
|
||||
<option value="$PROJECT_DIR$/example/lib/webview_example.screen.dart" />
|
||||
<option value="$PROJECT_DIR$/lib/src/content_blocker.dart" />
|
||||
<option value="$PROJECT_DIR$/lib/src/types.dart" />
|
||||
<option value="$PROJECT_DIR$/lib/src/in_app_webview.dart" />
|
||||
<option value="$PROJECT_DIR$/lib/src/in_app_browser.dart" />
|
||||
<option value="$PROJECT_DIR$/lib/src/chrome_safari_browser.dart" />
|
||||
<option value="$PROJECT_DIR$/example/lib/chrome_safari_example.screen.dart" />
|
||||
<option value="$PROJECT_DIR$/example/pubspec.yaml" />
|
||||
<option value="$PROJECT_DIR$/example/lib/inline_example.screen.dart" />
|
||||
<option value="$PROJECT_DIR$/lib/src/webview_options.dart" />
|
||||
</list>
|
||||
</option>
|
||||
</component>
|
||||
@ -269,17 +238,6 @@
|
||||
<foldersAlwaysOnTop value="true" />
|
||||
</navigator>
|
||||
<panes>
|
||||
<pane id="Scope">
|
||||
<subPane subId="Project Files">
|
||||
<expand>
|
||||
<path>
|
||||
<item name="Root" type="cbb8eebc:String" user="Root" />
|
||||
<item name="flutter_inappbrowser" type="cbb8eebc:String" user="flutter_inappbrowser" />
|
||||
</path>
|
||||
</expand>
|
||||
<select />
|
||||
</subPane>
|
||||
</pane>
|
||||
<pane id="AndroidView">
|
||||
<subPane>
|
||||
<expand>
|
||||
@ -309,6 +267,7 @@
|
||||
<select />
|
||||
</subPane>
|
||||
</pane>
|
||||
<pane id="PackagesPane" />
|
||||
<pane id="ProjectPane">
|
||||
<subPane>
|
||||
<expand>
|
||||
@ -316,11 +275,6 @@
|
||||
<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="android" type="462c0819:PsiDirectoryNode" />
|
||||
</path>
|
||||
<path>
|
||||
<item name="flutter_inappbrowser" type="b2602c69:ProjectViewProjectNode" />
|
||||
<item name="flutter_inappbrowser" type="462c0819:PsiDirectoryNode" />
|
||||
@ -330,7 +284,7 @@
|
||||
<item name="flutter_inappbrowser" type="b2602c69:ProjectViewProjectNode" />
|
||||
<item name="flutter_inappbrowser" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="example" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="assets" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="lib" type="462c0819:PsiDirectoryNode" />
|
||||
</path>
|
||||
<path>
|
||||
<item name="flutter_inappbrowser" type="b2602c69:ProjectViewProjectNode" />
|
||||
@ -346,7 +300,8 @@
|
||||
<path>
|
||||
<item name="flutter_inappbrowser" type="b2602c69:ProjectViewProjectNode" />
|
||||
<item name="flutter_inappbrowser" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="nodejs_server_test_auth_basic_and_ssl" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="lib" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="t_rex_runner" type="462c0819:PsiDirectoryNode" />
|
||||
</path>
|
||||
<path>
|
||||
<item name="flutter_inappbrowser" type="b2602c69:ProjectViewProjectNode" />
|
||||
@ -356,7 +311,17 @@
|
||||
<select />
|
||||
</subPane>
|
||||
</pane>
|
||||
<pane id="PackagesPane" />
|
||||
<pane id="Scope">
|
||||
<subPane subId="Project Files">
|
||||
<expand>
|
||||
<path>
|
||||
<item name="Root" type="cbb8eebc:String" user="Root" />
|
||||
<item name="flutter_inappbrowser" type="cbb8eebc:String" user="flutter_inappbrowser" />
|
||||
</path>
|
||||
</expand>
|
||||
<select />
|
||||
</subPane>
|
||||
</pane>
|
||||
</panes>
|
||||
</component>
|
||||
<component name="PropertiesComponent">
|
||||
@ -372,15 +337,15 @@
|
||||
<property name="project.structure.last.edited" value="SDK Location" />
|
||||
<property name="project.structure.proportion" value="0.15" />
|
||||
<property name="project.structure.side.proportion" value="0.2" />
|
||||
<property name="settings.editor.selected.configurable" value="flutter.settings" />
|
||||
<property name="settings.editor.selected.configurable" value="preferences.sourceCode.Other File Types" />
|
||||
<property name="show.migrate.to.gradle.popup" value="false" />
|
||||
</component>
|
||||
<component name="RecentsManager">
|
||||
<key name="MoveFile.RECENT_KEYS">
|
||||
<recent name="$PROJECT_DIR$/lib" />
|
||||
<recent name="$PROJECT_DIR$/example/assets" />
|
||||
<recent name="$PROJECT_DIR$/lib/src" />
|
||||
<recent name="$PROJECT_DIR$/lib/in_app_browser.dart" />
|
||||
<recent name="$PROJECT_DIR$/lib" />
|
||||
<recent name="$PROJECT_DIR$/example/assets/images" />
|
||||
</key>
|
||||
<key name="CopyFile.RECENT_KEYS">
|
||||
@ -507,10 +472,11 @@
|
||||
</todo-panel>
|
||||
</component>
|
||||
<component name="ToolWindowManager">
|
||||
<frame x="0" y="23" width="1920" height="1057" extended-state="6" />
|
||||
<frame x="0" y="23" width="1920" height="1057" extended-state="0" />
|
||||
<editor active="true" />
|
||||
<layout>
|
||||
<window_info content_ui="combo" id="Project" order="0" sideWeight="0.58835757" visible="true" weight="0.15867944" />
|
||||
<window_info id="Structure" order="1" sideWeight="0.4116424" side_tool="true" visible="true" weight="0.15867944" />
|
||||
<window_info content_ui="combo" id="Project" order="0" sideWeight="0.6529745" visible="true" weight="0.15867944" />
|
||||
<window_info id="Structure" order="1" sideWeight="0.34702548" side_tool="true" weight="0.15867944" />
|
||||
<window_info id="Designer" order="2" />
|
||||
<window_info id="Build Variants" order="3" side_tool="true" />
|
||||
<window_info id="Captures" order="4" side_tool="true" weight="0.32936507" />
|
||||
@ -520,7 +486,7 @@
|
||||
<window_info id="Resources Explorer" order="8" />
|
||||
<window_info anchor="bottom" id="Message" order="0" />
|
||||
<window_info anchor="bottom" id="Find" order="1" weight="0.32642487" />
|
||||
<window_info active="true" anchor="bottom" id="Run" order="2" sideWeight="0.49307775" visible="true" weight="0.5015544" />
|
||||
<window_info active="true" anchor="bottom" id="Run" order="2" sideWeight="0.49574015" visible="true" weight="0.5160622" />
|
||||
<window_info anchor="bottom" id="Debug" order="3" weight="0.34196892" />
|
||||
<window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
|
||||
<window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
|
||||
@ -528,13 +494,14 @@
|
||||
<window_info anchor="bottom" id="Android Profiler" order="7" show_stripe_button="false" />
|
||||
<window_info anchor="bottom" id="Event Log" order="8" sideWeight="0.50692225" side_tool="true" weight="0.38445595" />
|
||||
<window_info anchor="bottom" id="Version Control" order="9" weight="0.32953367" />
|
||||
<window_info anchor="bottom" id="Terminal" order="10" sideWeight="0.49533224" weight="0.3968912" />
|
||||
<window_info anchor="bottom" id="Terminal" order="10" sideWeight="0.49533224" weight="0.34507772" />
|
||||
<window_info anchor="bottom" id="Logcat" order="11" weight="0.32953367" />
|
||||
<window_info anchor="bottom" id="Messages" order="12" weight="0.226943" />
|
||||
<window_info anchor="bottom" id="Messages" order="12" weight="0.3253886" />
|
||||
<window_info anchor="bottom" id="Dependency Viewer" order="13" weight="0.32800853" />
|
||||
<window_info anchor="bottom" id="Dart Analysis" order="14" sideWeight="0.4968051" weight="0.3253886" />
|
||||
<window_info anchor="bottom" id="Flutter Performance" order="15" side_tool="true" />
|
||||
<window_info anchor="bottom" id="Flutter Performance" order="15" sideWeight="0.5042598" side_tool="true" weight="0.5160622" />
|
||||
<window_info anchor="bottom" id="Build" order="16" />
|
||||
<window_info anchor="bottom" id="Thumbnails" order="17" weight="0.32953367" />
|
||||
<window_info anchor="right" id="Commander" order="0" weight="0.4" />
|
||||
<window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
|
||||
<window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
|
||||
@ -549,6 +516,7 @@
|
||||
</component>
|
||||
<component name="UnknownFeatures">
|
||||
<option featureType="com.intellij.fileTypeFactory" implementationName="*.css" />
|
||||
<option featureType="com.intellij.fileTypeFactory" implementationName="*.js" />
|
||||
</component>
|
||||
<component name="VcsManagerConfiguration">
|
||||
<ignored-roots>
|
||||
@ -556,151 +524,6 @@
|
||||
</ignored-roots>
|
||||
</component>
|
||||
<component name="editorHistoryManager">
|
||||
<entry file="file://$USER_HOME$/flutter/packages/flutter/lib/src/widgets/platform_view.dart">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="-182">
|
||||
<caret line="62" column="8" selection-start-line="62" selection-start-column="8" selection-end-line="62" selection-end-column="8" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$USER_HOME$/flutter/packages/flutter/lib/src/widgets/framework.dart">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="125">
|
||||
<caret line="779" column="15" selection-start-line="779" selection-start-column="15" selection-end-line="779" selection-end-column="15" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$USER_HOME$/flutter/packages/flutter/lib/src/widgets/container.dart">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="-382">
|
||||
<caret line="253" column="2" selection-start-line="253" selection-start-column="2" selection-end-line="253" selection-end-column="2" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/example/assets/css/style.css">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="435">
|
||||
<caret line="29" column="24" selection-start-line="29" selection-start-column="20" selection-end-line="29" selection-end-column="24" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/example/ios/Runner/Base.lproj/Main.storyboard">
|
||||
<provider selected="true" editor-type-id="text-editor" />
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/ios/Classes/InAppWebView.swift">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="426">
|
||||
<caret line="257" column="35" selection-start-line="257" selection-start-column="35" selection-end-line="257" selection-end-column="35" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/android/src/main/AndroidManifest.xml">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="180">
|
||||
<caret line="12" column="11" selection-start-line="12" selection-start-column="11" selection-end-line="12" selection-end-column="11" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/example/android/app/src/main/java/com/pichillilorenzo/flutterwebviewexample/MainActivity.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="60">
|
||||
<caret line="6" column="13" selection-start-line="6" selection-start-column="13" selection-end-line="6" selection-end-column="13" />
|
||||
</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="960">
|
||||
<caret line="64" column="74" selection-start-line="64" selection-start-column="74" selection-end-line="64" selection-end-column="74" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/example/android/build.gradle">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="195">
|
||||
<caret line="13" column="16" selection-start-line="13" selection-start-column="16" selection-end-line="13" selection-end-column="16" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/lib/src/in_app_localhost_server.dart">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="60">
|
||||
<caret line="4" column="32" selection-start-line="4" selection-start-column="32" selection-end-line="4" selection-end-column="32" />
|
||||
<folding>
|
||||
<element signature="e#0#17#0" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/lib/src/web_history.dart" />
|
||||
<entry file="file://$PROJECT_DIR$/README.md">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="405">
|
||||
<caret line="27" column="3" lean-forward="true" selection-start-line="27" selection-start-column="3" selection-end-line="27" selection-end-column="3" />
|
||||
<folding>
|
||||
<element signature="e#0#20#0" expanded="true" />
|
||||
<element signature="e#0#39#0" expanded="true" />
|
||||
<element signature="e#0#39#0" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/example/lib/test.dart">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="-279">
|
||||
<caret line="8" column="38" selection-start-line="8" selection-start-column="38" selection-end-line="8" selection-end-column="38" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$USER_HOME$/flutter/bin/cache/pkg/sky_engine/lib/core/list.dart">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="249">
|
||||
<caret line="306" column="10" selection-start-line="306" selection-start-column="10" selection-end-line="306" selection-end-column="10" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/example/ios/Podfile">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="990">
|
||||
<caret line="66" column="3" lean-forward="true" selection-start-line="66" selection-start-column="3" selection-end-line="66" selection-end-column="3" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/example/ios/Runner/Info.plist">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="60">
|
||||
<caret line="4" column="41" selection-start-line="4" selection-start-column="41" selection-end-line="4" selection-end-column="41" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$USER_HOME$/flutter/bin/cache/pkg/sky_engine/lib/core/map.dart">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="181">
|
||||
<caret line="303" column="4" selection-start-line="303" selection-start-column="4" selection-end-line="303" selection-end-column="4" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/lib/src/content_blocker.dart">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="375">
|
||||
<caret line="25" column="34" selection-start-line="25" selection-start-column="34" selection-end-line="25" selection-end-column="34" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$USER_HOME$/flutter/packages/flutter/lib/src/material/dialog.dart">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="307">
|
||||
<caret line="690" column="10" selection-start-line="690" selection-start-column="10" selection-end-line="690" selection-end-column="10" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$USER_HOME$/flutter/bin/cache/pkg/sky_engine/lib/io/platform.dart">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="233">
|
||||
<caret line="67" selection-start-line="67" selection-end-line="67" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/lib/flutter_inappbrowser.dart">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="195">
|
||||
@ -708,16 +531,6 @@
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/lib/src/chrome_safari_browser.dart">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="225">
|
||||
<caret line="15" column="25" selection-start-line="15" selection-start-column="6" selection-end-line="15" selection-end-column="25" />
|
||||
<folding>
|
||||
<element signature="e#0#20#0" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/example/assets/client1-crt.pem" />
|
||||
<entry file="file://$PROJECT_DIR$/example/assets/client1-crt.crt" />
|
||||
<entry file="file://$PROJECT_DIR$/pubspec.lock">
|
||||
@ -743,23 +556,6 @@
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/example/lib/webview_example.screen.dart">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="302">
|
||||
<caret line="73" lean-forward="true" selection-start-line="73" selection-end-line="73" />
|
||||
<folding>
|
||||
<element signature="e#0#20#0" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/example/lib/main.dart">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="135">
|
||||
<caret line="9" column="7" selection-start-line="9" selection-start-column="7" selection-end-line="9" selection-end-column="7" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/lib/src/channel_manager.dart">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="180">
|
||||
@ -790,15 +586,6 @@
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/example/lib/chrome_safari_example.screen.dart">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state>
|
||||
<folding>
|
||||
<element signature="e#0#39#0" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$USER_HOME$/flutter/bin/cache/pkg/sky_engine/lib/core/uri.dart">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="15">
|
||||
@ -806,49 +593,13 @@
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/lib/src/types.dart">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="235">
|
||||
<caret line="424" column="64" selection-start-line="424" selection-start-column="64" selection-end-line="424" selection-end-column="64" />
|
||||
<folding>
|
||||
<element signature="e#0#20#0" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/lib/src/in_app_browser.dart">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="76">
|
||||
<caret line="268" column="65" selection-start-line="268" selection-start-column="65" selection-end-line="268" selection-end-column="65" />
|
||||
<folding>
|
||||
<element signature="e#0#20#0" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/example/android/gradle.properties">
|
||||
<provider selected="true" editor-type-id="text-editor" />
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/android/local.properties">
|
||||
<provider selected="true" editor-type-id="text-editor" />
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/android/gradle.properties">
|
||||
<provider selected="true" editor-type-id="text-editor" />
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/example/pubspec.yaml">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="141">
|
||||
<caret line="12" column="32" selection-start-line="12" selection-start-column="32" selection-end-line="12" selection-end-column="32" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/pubspec.yaml">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="-107">
|
||||
<caret line="8" column="36" selection-start-line="8" selection-start-column="36" selection-end-line="8" selection-end-column="36" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/android/gradle.properties" />
|
||||
<entry file="file://$PROJECT_DIR$/android/build.gradle">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="256">
|
||||
@ -856,53 +607,195 @@
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/CHANGELOG.md">
|
||||
<entry file="file://$PROJECT_DIR$/nodejs_server_test_auth_basic_and_ssl/index.js">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="336">
|
||||
<caret line="28" column="24" selection-start-line="28" selection-start-column="24" selection-end-line="28" selection-end-column="24" />
|
||||
<state relative-caret-position="733">
|
||||
<caret line="111" column="34" selection-start-line="111" selection-start-column="34" selection-end-line="111" selection-end-column="34" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$USER_HOME$/flutter/bin/cache/pkg/sky_engine/lib/io/file.dart">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="-1206">
|
||||
<caret line="251" column="10" selection-start-line="251" selection-start-column="10" selection-end-line="251" selection-end-column="10" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$USER_HOME$/flutter/packages/flutter/lib/src/services/asset_bundle.dart">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="15">
|
||||
<caret line="65" column="17" selection-start-line="65" selection-start-column="17" selection-end-line="65" selection-end-column="17" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/example/lib/main.dart">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="45">
|
||||
<caret line="12" column="23" selection-start-line="12" selection-start-column="3" selection-end-line="12" selection-end-column="23" />
|
||||
<folding>
|
||||
<element signature="e#0#20#0" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/example/assets/index.html">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="888">
|
||||
<caret line="79" column="11" selection-start-line="79" selection-start-column="11" selection-end-line="79" selection-end-column="11" />
|
||||
<state relative-caret-position="240">
|
||||
<caret line="34" column="87" selection-start-line="34" selection-start-column="87" selection-end-line="34" selection-end-column="87" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/nodejs_server_test_auth_basic_and_ssl/index.js">
|
||||
<entry file="file://$PROJECT_DIR$/lib/t_rex_runner/assets/novas-coisas.gif" />
|
||||
<entry file="file://$PROJECT_DIR$/lib/t_rex_runner/assets/t-rex-runner-19janil.gif" />
|
||||
<entry file="file://$PROJECT_DIR$/lib/t_rex_runner/assets/t-rex-runner-bot.gif" />
|
||||
<entry file="file://$PROJECT_DIR$/lib/t_rex_runner/assets/hello-kugou.gif" />
|
||||
<entry file="file://$PROJECT_DIR$/lib/t_rex_runner/assets/kumamon-runner.gif" />
|
||||
<entry file="file://$PROJECT_DIR$/lib/t_rex_runner/assets/screenshot.gif" />
|
||||
<entry file="file://$PROJECT_DIR$/lib/t_rex_runner/assets/default_200_percent/200-offline-sprite.png" />
|
||||
<entry file="file://$PROJECT_DIR$/lib/t_rex_runner/assets/default_200_percent/200-error-offline.png" />
|
||||
<entry file="file://$PROJECT_DIR$/lib/t_rex_runner/assets/default_200_percent/200-disabled.png" />
|
||||
<entry file="file://$PROJECT_DIR$/lib/t_rex_runner/assets/offline-sprite-2x.png" />
|
||||
<entry file="file://$PROJECT_DIR$/lib/t_rex_runner/assets/offline-sprite-1x.png" />
|
||||
<entry file="file://$PROJECT_DIR$/lib/t_rex_runner/index.css" />
|
||||
<entry file="file://$PROJECT_DIR$/lib/t_rex_runner/index.js" />
|
||||
<entry file="file://$PROJECT_DIR$/lib/t_rex_runner/t-rex.html">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="423">
|
||||
<caret line="49" column="46" selection-start-line="49" selection-start-column="46" selection-end-line="49" selection-end-column="46" />
|
||||
<state relative-caret-position="225">
|
||||
<caret line="15" column="38" selection-start-line="15" selection-start-column="38" selection-end-line="15" selection-end-column="38" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/lib/src/webview_options.dart">
|
||||
<entry file="file://$PROJECT_DIR$/lib/t_rex_runner/t-rex.css">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="142">
|
||||
<caret line="57" column="24" selection-start-line="57" selection-start-column="7" selection-end-line="57" selection-end-column="24" />
|
||||
<state relative-caret-position="885">
|
||||
<caret line="59" selection-start-line="59" selection-end-line="59" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/pubspec.yaml">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="178">
|
||||
<caret line="28" column="58" selection-start-line="28" selection-start-column="58" selection-end-line="28" selection-end-column="58" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/example/lib/test.dart">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="827">
|
||||
<caret line="402" column="63" selection-start-line="402" selection-start-column="63" selection-end-line="402" selection-end-column="63" />
|
||||
<folding>
|
||||
<element signature="e#0#17#0" expanded="true" />
|
||||
<element signature="e#0#16406#0" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/CHANGELOG.md">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="408">
|
||||
<caret line="29" column="8" selection-start-line="29" selection-start-column="8" selection-end-line="29" selection-end-column="8" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$USER_HOME$/flutter/bin/cache/dart-sdk/lib/collection/linked_hash_map.dart">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="137">
|
||||
<caret line="88" column="12" selection-start-line="88" selection-start-column="12" selection-end-line="88" selection-end-column="12" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/example/lib/webview_example.screen.dart">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="465">
|
||||
<caret line="131" column="14" selection-start-line="131" selection-start-column="14" selection-end-line="131" selection-end-column="14" />
|
||||
<folding>
|
||||
<element signature="e#0#20#0" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/lib/src/content_blocker.dart">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="-206">
|
||||
<caret line="128" column="36" selection-start-line="128" selection-start-column="18" selection-end-line="128" selection-end-column="36" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/example/lib/chrome_safari_example.screen.dart">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="600">
|
||||
<caret line="45" column="53" lean-forward="true" selection-start-line="45" selection-start-column="53" selection-end-line="45" selection-end-column="53" />
|
||||
<folding>
|
||||
<element signature="e#0#39#0" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/lib/src/chrome_safari_browser.dart">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="394">
|
||||
<caret line="94" column="5" selection-start-line="94" selection-start-column="5" selection-end-line="94" selection-end-column="5" />
|
||||
<folding>
|
||||
<element signature="e#0#20#0" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/lib/src/in_app_browser.dart">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="239">
|
||||
<caret line="287" column="5" selection-start-line="276" selection-start-column="4" selection-end-line="287" selection-end-column="5" />
|
||||
<folding>
|
||||
<element signature="e#0#20#0" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/lib/src/types.dart">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="215">
|
||||
<caret line="658" column="30" selection-start-line="658" selection-start-column="6" selection-end-line="658" selection-end-column="30" />
|
||||
<folding>
|
||||
<element signature="e#0#20#0" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/example/build/app/outputs/apk/debug/output.json">
|
||||
<provider selected="true" editor-type-id="text-editor" />
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/example/pubspec.yaml">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="131">
|
||||
<caret line="24" column="27" selection-start-line="24" selection-start-column="27" selection-end-line="24" selection-end-column="27" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/example/lib/inline_example.screen.dart">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="28">
|
||||
<caret line="94" column="32" selection-start-line="94" selection-start-column="16" selection-end-line="94" selection-end-column="32" />
|
||||
<folding>
|
||||
<element signature="e#0#20#0" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/lib/src/in_app_webview.dart">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="183">
|
||||
<caret line="114" column="101" selection-start-line="114" selection-start-column="87" selection-end-line="114" selection-end-column="101" />
|
||||
<state relative-caret-position="251">
|
||||
<caret line="265" column="89" selection-start-line="261" selection-start-column="4" selection-end-line="265" selection-end-column="89" />
|
||||
<folding>
|
||||
<element signature="e#0#17#0" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/example/lib/inline_example.screen.dart">
|
||||
<entry file="file://$PROJECT_DIR$/lib/src/webview_options.dart">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="294">
|
||||
<caret line="261" column="187" selection-start-line="259" selection-start-column="14" selection-end-line="261" selection-end-column="187" />
|
||||
<state relative-caret-position="364">
|
||||
<caret line="81" column="43" selection-start-line="81" selection-start-column="43" selection-end-line="81" selection-end-column="43" />
|
||||
<folding>
|
||||
<element signature="e#0#20#0" expanded="true" />
|
||||
<element signature="e#0#17#0" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
|
@ -27,6 +27,7 @@
|
||||
- Added `onReceivedServerTrustAuthRequest` and `onReceivedClientCertRequest` events to manage SSL requests
|
||||
- Added `onFindResultReceived` event, `findAllAsync`, `findNext` and `clearMatches` methods
|
||||
- Added `getHtml` method
|
||||
- Fun: added `getTRexRunnerHtml` and `getTRexRunnerCss` methods to get html (with javascript) and css to recreate the Chromium's t-rex runner game
|
||||
|
||||
### BREAKING CHANGES
|
||||
- Deleted `WebResourceRequest` class
|
||||
|
@ -118,7 +118,7 @@ public class ContentBlockerHandler {
|
||||
if (!trigger.ifTopUrl.isEmpty()) {
|
||||
boolean matchFound = false;
|
||||
for (String topUrl : trigger.ifTopUrl) {
|
||||
if (webViewUrl[0].equals(topUrl)) {
|
||||
if (webViewUrl[0].startsWith(topUrl)) {
|
||||
matchFound = true;
|
||||
break;
|
||||
}
|
||||
@ -128,7 +128,7 @@ public class ContentBlockerHandler {
|
||||
}
|
||||
if (!trigger.unlessTopUrl.isEmpty()) {
|
||||
for (String topUrl : trigger.unlessTopUrl)
|
||||
if (webViewUrl[0].equals(topUrl))
|
||||
if (webViewUrl[0].startsWith(topUrl))
|
||||
return null;
|
||||
}
|
||||
|
||||
|
@ -387,6 +387,9 @@ final public class InAppWebView extends InputAwareWebView {
|
||||
if (newOptionsMap.get("javaScriptEnabled") != null && options.javaScriptEnabled != newOptions.javaScriptEnabled)
|
||||
settings.setJavaScriptEnabled(newOptions.javaScriptEnabled);
|
||||
|
||||
if (newOptionsMap.get("debuggingEnabled") != null && options.debuggingEnabled != newOptions.debuggingEnabled && Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT)
|
||||
setWebContentsDebuggingEnabled(newOptions.debuggingEnabled);
|
||||
|
||||
if (newOptionsMap.get("javaScriptCanOpenWindowsAutomatically") != null && options.javaScriptCanOpenWindowsAutomatically != newOptions.javaScriptCanOpenWindowsAutomatically)
|
||||
settings.setJavaScriptCanOpenWindowsAutomatically(newOptions.javaScriptCanOpenWindowsAutomatically);
|
||||
|
||||
|
@ -639,18 +639,18 @@ public class InAppWebViewClient extends WebViewClient {
|
||||
Log.e(LOG_TAG, flutterResult.error);
|
||||
}
|
||||
else if (flutterResult.result != null) {
|
||||
Map<String, String> res = (Map<String, String>) flutterResult.result;
|
||||
Map<String, Object> res = (Map<String, Object>) flutterResult.result;
|
||||
WebResourceResponse response = null;
|
||||
try {
|
||||
response = webView.contentBlockerHandler.checkUrl(webView, url, res.get("content-type"));
|
||||
response = webView.contentBlockerHandler.checkUrl(webView, url, res.get("content-type").toString());
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
Log.e(LOG_TAG, e.getMessage());
|
||||
}
|
||||
if (response != null)
|
||||
return response;
|
||||
byte[] data = Base64.decode(res.get("base64data"), Base64.DEFAULT);
|
||||
return new WebResourceResponse(res.get("content-type"), res.get("content-encoding"), new ByteArrayInputStream(data));
|
||||
byte[] data = (byte[]) res.get("data");
|
||||
return new WebResourceResponse(res.get("content-type").toString(), res.get("content-encoding").toString(), new ByteArrayInputStream(data));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -36,6 +36,11 @@
|
||||
</p>
|
||||
</main>
|
||||
|
||||
<!--<form method="POST" action="http://192.168.1.20:8082/test-post">
|
||||
<input type="text" name="name" placeholder="name" value="Lorenzo">
|
||||
<input type="submit" value="SEND">
|
||||
</form>-->
|
||||
|
||||
<footer class="mastfoot mt-auto">
|
||||
<div class="inner">
|
||||
<p>Cover template for <a target="_blank" href="https://getbootstrap.com/">Bootstrap</a>, by <a href="https://twitter.com/mdo">@mdo</a>.</p>
|
||||
|
@ -1,5 +1,5 @@
|
||||
# Uncomment this line to define a global platform for your project
|
||||
# platform :ios, '9.0'
|
||||
platform :ios, '8.0'
|
||||
|
||||
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
|
||||
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
|
||||
|
@ -267,7 +267,8 @@
|
||||
);
|
||||
inputPaths = (
|
||||
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh",
|
||||
"${PODS_ROOT}/../.symlinks/flutter/ios-release/Flutter.framework",
|
||||
"${PODS_ROOT}/../.symlinks/flutter/ios/Flutter.framework",
|
||||
"${BUILT_PRODUCTS_DIR}/WKWebViewWithURLProtocol/WKWebViewWithURLProtocol.framework",
|
||||
"${BUILT_PRODUCTS_DIR}/flutter_downloader/flutter_downloader.framework",
|
||||
"${BUILT_PRODUCTS_DIR}/flutter_inappbrowser/flutter_inappbrowser.framework",
|
||||
"${BUILT_PRODUCTS_DIR}/path_provider/path_provider.framework",
|
||||
@ -275,6 +276,7 @@
|
||||
name = "[CP] Embed Pods Frameworks";
|
||||
outputPaths = (
|
||||
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Flutter.framework",
|
||||
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/WKWebViewWithURLProtocol.framework",
|
||||
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/flutter_downloader.framework",
|
||||
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/flutter_inappbrowser.framework",
|
||||
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/path_provider.framework",
|
||||
@ -296,7 +298,7 @@
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
|
||||
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build\n";
|
||||
};
|
||||
/* End PBXShellScriptBuildPhase section */
|
||||
|
||||
|
@ -36,10 +36,12 @@ class _ChromeSafariExampleScreenState extends State<ChromeSafariExampleScreen> {
|
||||
return new Center(
|
||||
child: new RaisedButton(
|
||||
onPressed: () async {
|
||||
await widget.browser.open("https://flutter.dev/", options: [
|
||||
AndroidChromeCustomTabsOptions(addShareButton: false),
|
||||
iOSSafariOptions(barCollapsingEnabled: true)
|
||||
]);
|
||||
await widget.browser.open("https://flutter.dev/",
|
||||
options: ChromeSafariBrowserClassOptions(
|
||||
androidChromeCustomTabsOptions: AndroidChromeCustomTabsOptions(addShareButton: false),
|
||||
iosSafariOptions: IosSafariOptions(barCollapsingEnabled: true)
|
||||
)
|
||||
);
|
||||
},
|
||||
child: Text("Open Chrome Safari Browser")),
|
||||
);
|
||||
|
@ -1,6 +1,7 @@
|
||||
import 'dart:async';
|
||||
import 'dart:convert';
|
||||
import 'dart:io';
|
||||
import 'dart:typed_data';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
@ -89,33 +90,34 @@ class _InlineExampleScreenState extends State<InlineExampleScreen> {
|
||||
//initialUrl: "https://192.168.1.20:4433/",
|
||||
initialFile: "assets/index.html",
|
||||
initialHeaders: {},
|
||||
initialOptions: [
|
||||
InAppWebViewOptions(
|
||||
initialOptions: InAppWebViewWidgetOptions(
|
||||
inAppWebViewOptions: InAppWebViewOptions(
|
||||
debuggingEnabled: true,
|
||||
//clearCache: true,
|
||||
useShouldOverrideUrlLoading: true,
|
||||
useOnTargetBlank: true,
|
||||
//useOnLoadResource: true,
|
||||
useOnDownloadStart: true,
|
||||
preferredContentMode: InAppWebViewUserPreferredContentMode.DESKTOP,
|
||||
//preferredContentMode: InAppWebViewUserPreferredContentMode.DESKTOP,
|
||||
resourceCustomSchemes: ["my-special-custom-scheme"],
|
||||
/*contentBlockers: [
|
||||
ContentBlocker(
|
||||
ContentBlockerTrigger(".*",
|
||||
resourceType: [ContentBlockerTriggerResourceType.IMAGE, ContentBlockerTriggerResourceType.STYLE_SHEET],
|
||||
ifTopUrl: ["https://getbootstrap.com/"]),
|
||||
ContentBlockerAction(ContentBlockerActionType.BLOCK)
|
||||
)
|
||||
]*/
|
||||
),
|
||||
AndroidInAppWebViewOptions(
|
||||
contentBlockers: [
|
||||
ContentBlocker(
|
||||
ContentBlockerTrigger(".*",
|
||||
resourceType: [ContentBlockerTriggerResourceType.IMAGE, ContentBlockerTriggerResourceType.STYLE_SHEET],
|
||||
ifTopUrl: ["https://getbootstrap.com/"]),
|
||||
ContentBlockerAction(ContentBlockerActionType.BLOCK)
|
||||
)
|
||||
]
|
||||
),
|
||||
androidInAppWebViewOptions: AndroidInAppWebViewOptions(
|
||||
databaseEnabled: true,
|
||||
appCacheEnabled: true,
|
||||
domStorageEnabled: true,
|
||||
geolocationEnabled: true,
|
||||
safeBrowsingEnabled: true,
|
||||
//safeBrowsingEnabled: true,
|
||||
//blockNetworkImage: true,
|
||||
),
|
||||
],
|
||||
),
|
||||
onWebViewCreated: (InAppWebViewController controller) {
|
||||
webView = controller;
|
||||
|
||||
@ -148,6 +150,28 @@ class _InlineExampleScreenState extends State<InlineExampleScreen> {
|
||||
},
|
||||
onLoadError: (InAppWebViewController controller, String url, int code, String message) async {
|
||||
print("error $url: $code, $message");
|
||||
|
||||
var tRexHtml = await controller.getTRexRunnerHtml();
|
||||
var tRexCss = await controller.getTRexRunnerCss();
|
||||
|
||||
controller.loadData("""
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0,maximum-scale=1.0, user-scalable=no">
|
||||
<style>${tRexCss}</style>
|
||||
</head>
|
||||
<body>
|
||||
${tRexHtml}
|
||||
<p>
|
||||
URL ${url} failed to load.
|
||||
</p>
|
||||
<p>
|
||||
Error: ${code}, ${message}
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
""");
|
||||
},
|
||||
onProgressChanged:
|
||||
(InAppWebViewController controller, int progress) {
|
||||
@ -159,7 +183,7 @@ class _InlineExampleScreenState extends State<InlineExampleScreen> {
|
||||
print("override $url");
|
||||
controller.loadUrl(url);
|
||||
},
|
||||
onLoadResource: (InAppWebViewController controller, WebResourceResponse response) {
|
||||
onLoadResource: (InAppWebViewController controller, LoadedResource response) {
|
||||
print("Resource type: '"+response.initiatorType + "' started at: " +
|
||||
response.startTime.toString() +
|
||||
"ms ---> duration: " +
|
||||
@ -187,8 +211,7 @@ class _InlineExampleScreenState extends State<InlineExampleScreen> {
|
||||
onLoadResourceCustomScheme: (InAppWebViewController controller, String scheme, String url) async {
|
||||
if (scheme == "my-special-custom-scheme") {
|
||||
var bytes = await rootBundle.load("assets/" + url.replaceFirst("my-special-custom-scheme://", "", 0));
|
||||
var asBase64 = base64.encode(bytes.buffer.asUint8List());
|
||||
var response = new CustomSchemeResponse(asBase64, "image/svg+xml", contentEnconding: "utf-8");
|
||||
var response = new CustomSchemeResponse(bytes.buffer.asUint8List(), "image/svg+xml", contentEnconding: "utf-8");
|
||||
return response;
|
||||
}
|
||||
return null;
|
||||
|
@ -400,7 +400,7 @@ class _MyAppState extends State<MyApp> {
|
||||
initialHeaders: {
|
||||
|
||||
},
|
||||
initialOptions: [],
|
||||
initialOptions: InAppWebViewWidgetOptions(),
|
||||
onWebViewCreated: (InAppWebViewController controller) {
|
||||
webView = controller;
|
||||
},
|
||||
|
@ -47,7 +47,7 @@ class MyInappBrowser extends InAppBrowser {
|
||||
}
|
||||
|
||||
@override
|
||||
void onLoadResource(WebResourceResponse response) {
|
||||
void onLoadResource(LoadedResource response) {
|
||||
print("Started at: " +
|
||||
response.startTime.toString() +
|
||||
"ms ---> duration: " +
|
||||
@ -121,12 +121,14 @@ class _WebviewExampleScreenState extends State<WebviewExampleScreen> {
|
||||
widget.browser.openFile(
|
||||
"assets/index.html",
|
||||
//url: "https://www.google.com/",
|
||||
options: [
|
||||
InAppWebViewOptions(
|
||||
options: InAppBrowserClassOptions(
|
||||
inAppWebViewWidgetOptions: InAppWebViewWidgetOptions(
|
||||
inAppWebViewOptions: InAppWebViewOptions(
|
||||
useShouldOverrideUrlLoading: true,
|
||||
useOnLoadResource: true,
|
||||
)
|
||||
)
|
||||
]
|
||||
)
|
||||
);
|
||||
},
|
||||
child: Text("Open Webview Browser")),
|
||||
|
@ -20,13 +20,13 @@ class CustomeSchemeHandler : NSObject, WKURLSchemeHandler {
|
||||
}
|
||||
else if (result as? NSObject) == FlutterMethodNotImplemented {}
|
||||
else {
|
||||
let json: [String: String]
|
||||
let json: [String: Any]
|
||||
if let r = result {
|
||||
json = r as! [String: String]
|
||||
let urlResponse = URLResponse(url: url, mimeType: json["content-type"], expectedContentLength: -1, textEncodingName: json["content-encoding"])
|
||||
let data = Data(base64Encoded: json["base64data"]!, options: .ignoreUnknownCharacters)
|
||||
json = r as! [String: Any]
|
||||
let urlResponse = URLResponse(url: url, mimeType: json["content-type"] as! String, expectedContentLength: -1, textEncodingName: json["content-encoding"] as! String)
|
||||
let data = json["data"] as! FlutterStandardTypedData
|
||||
urlSchemeTask.didReceive(urlResponse)
|
||||
urlSchemeTask.didReceive(data!)
|
||||
urlSchemeTask.didReceive(data.data)
|
||||
urlSchemeTask.didFinish()
|
||||
}
|
||||
}
|
||||
|
@ -14,9 +14,10 @@ public class FlutterWebViewController: NSObject, FlutterPlatformView {
|
||||
var webView: InAppWebView?
|
||||
var viewId: Int64 = 0
|
||||
var channel: FlutterMethodChannel?
|
||||
|
||||
|
||||
init(registrar: FlutterPluginRegistrar, withFrame frame: CGRect, viewIdentifier viewId: Int64, arguments args: NSDictionary) {
|
||||
super.init()
|
||||
|
||||
self.registrar = registrar
|
||||
self.viewId = viewId
|
||||
|
||||
|
@ -8,6 +8,7 @@
|
||||
import Flutter
|
||||
import Foundation
|
||||
import WebKit
|
||||
import WKWebViewWithURLProtocol
|
||||
|
||||
func currentTimeInMilliSeconds() -> Int64 {
|
||||
let currentDate = Date()
|
||||
@ -242,6 +243,7 @@ public class InAppWebView: WKWebView, UIScrollViewDelegate, WKUIDelegate, WKNavi
|
||||
static var credentialsProposed: [URLCredential] = []
|
||||
|
||||
init(frame: CGRect, configuration: WKWebViewConfiguration, IABController: InAppBrowserWebViewController?, IAWController: FlutterWebViewController?) {
|
||||
|
||||
super.init(frame: frame, configuration: configuration)
|
||||
self.IABController = IABController
|
||||
self.IAWController = IAWController
|
||||
|
@ -47,6 +47,7 @@ public class SwiftFlutterPlugin: NSObject, FlutterPlugin {
|
||||
|
||||
public init(with registrar: FlutterPluginRegistrar) {
|
||||
super.init()
|
||||
|
||||
self.registrar = registrar
|
||||
self.channel = FlutterMethodChannel(name: "com.pichillilorenzo/flutter_inappbrowser", binaryMessenger: registrar.messenger())
|
||||
registrar.addMethodCallDelegate(self, channel: channel!)
|
||||
|
@ -17,7 +17,7 @@ A new Flutter plugin.
|
||||
s.public_header_files = 'Classes/**/*.h'
|
||||
s.dependency 'Flutter'
|
||||
|
||||
s.platform = '8.0'
|
||||
s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'VALID_ARCHS[sdk=iphonesimulator*]' => 'x86_64' }
|
||||
s.swift_version = '5.0'
|
||||
s.dependency "WKWebViewWithURLProtocol"
|
||||
end
|
||||
|
@ -1,7 +1,7 @@
|
||||
import 'dart:async';
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_inappbrowser/src/webview_options.dart';
|
||||
|
||||
import 'types.dart';
|
||||
import 'channel_manager.dart';
|
||||
@ -70,19 +70,29 @@ class ChromeSafariBrowser {
|
||||
///- __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, {List<ChromeSafariBrowserOptions> options = const [], Map<String, String> headersFallback = const {}, List<BrowserOptions> optionsFallback = const []}) async {
|
||||
Future<void> open(String url, {ChromeSafariBrowserClassOptions options, Map<String, String> headersFallback = const {}, InAppBrowserClassOptions optionsFallback}) async {
|
||||
assert(url != null && url.isNotEmpty);
|
||||
this.throwIsAlreadyOpened(message: 'Cannot open $url!');
|
||||
|
||||
Map<String, dynamic> optionsMap = {};
|
||||
options.forEach((webViewOption) {
|
||||
optionsMap.addAll(webViewOption.toMap());
|
||||
});
|
||||
if (Platform.isAndroid)
|
||||
optionsMap.addAll(options.androidChromeCustomTabsOptions?.toMap() ?? {});
|
||||
else if (Platform.isIOS)
|
||||
optionsMap.addAll(options.iosSafariOptions?.toMap() ?? {});
|
||||
|
||||
Map<String, dynamic> optionsFallbackMap = {};
|
||||
optionsFallback.forEach((webViewOption) {
|
||||
optionsFallbackMap.addAll(webViewOption.toMap());
|
||||
});
|
||||
if (optionsFallback != null) {
|
||||
optionsFallbackMap.addAll(optionsFallback.inAppBrowserOptions?.toMap() ?? {});
|
||||
optionsFallbackMap.addAll(optionsFallback.inAppWebViewWidgetOptions?.inAppWebViewOptions?.toMap() ?? {});
|
||||
if (Platform.isAndroid) {
|
||||
optionsFallbackMap.addAll(optionsFallback.androidInAppBrowserOptions?.toMap() ?? {});
|
||||
optionsFallbackMap.addAll(optionsFallback.inAppWebViewWidgetOptions?.androidInAppWebViewOptions?.toMap() ?? {});
|
||||
}
|
||||
else if (Platform.isIOS) {
|
||||
optionsFallbackMap.addAll(optionsFallback.iosInAppBrowserOptions?.toMap() ?? {});
|
||||
optionsFallbackMap.addAll(optionsFallback.inAppWebViewWidgetOptions?.iosInAppWebViewOptions?.toMap() ?? {});
|
||||
}
|
||||
}
|
||||
|
||||
Map<String, dynamic> args = <String, dynamic>{};
|
||||
args.putIfAbsent('uuid', () => uuid);
|
||||
|
@ -10,11 +10,26 @@ class ContentBlocker {
|
||||
"action": action.toMap()
|
||||
};
|
||||
}
|
||||
|
||||
static ContentBlocker fromMap(Map<dynamic, Map<dynamic, dynamic>> map) {
|
||||
return ContentBlocker(
|
||||
ContentBlockerTrigger.fromMap(
|
||||
Map<String, dynamic>.from(map["trigger"])
|
||||
),
|
||||
ContentBlockerAction.fromMap(
|
||||
Map<String, dynamic>.from(map["action"])
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class ContentBlockerTriggerResourceType {
|
||||
final String _value;
|
||||
const ContentBlockerTriggerResourceType._internal(this._value);
|
||||
static ContentBlockerTriggerResourceType fromValue(String value) {
|
||||
return (["document", "image", "LINK", "style-sheet", "script", "font",
|
||||
"media", "svg-document", "raw"].contains(value)) ? ContentBlockerTriggerResourceType._internal(value) : null;
|
||||
}
|
||||
toValue() => _value;
|
||||
|
||||
static const DOCUMENT = const ContentBlockerTriggerResourceType._internal('document');
|
||||
@ -30,6 +45,9 @@ class ContentBlockerTriggerResourceType {
|
||||
class ContentBlockerTriggerLoadType {
|
||||
final String _value;
|
||||
const ContentBlockerTriggerLoadType._internal(this._value);
|
||||
static ContentBlockerTriggerLoadType fromValue(String value) {
|
||||
return (["first-party", "third-party"].contains(value)) ? ContentBlockerTriggerLoadType._internal(value) : null;
|
||||
}
|
||||
toValue() => _value;
|
||||
|
||||
static const FIRST_PARTY = const ContentBlockerTriggerLoadType._internal('first-party');
|
||||
@ -90,11 +108,40 @@ class ContentBlockerTrigger {
|
||||
|
||||
return map;
|
||||
}
|
||||
|
||||
static ContentBlockerTrigger fromMap(Map<String, dynamic> map) {
|
||||
List<ContentBlockerTriggerResourceType> resourceType = [];
|
||||
List<ContentBlockerTriggerLoadType> loadType = [];
|
||||
|
||||
List<String> resourceTypeStringList = List<String>.from(map["resource-type"] ?? []);
|
||||
resourceTypeStringList.forEach((type) {
|
||||
resourceType.add(ContentBlockerTriggerResourceType.fromValue(type));
|
||||
});
|
||||
|
||||
List<String> loadTypeStringList = List<String>.from(map["load-type"] ?? []);
|
||||
loadTypeStringList.forEach((type) {
|
||||
loadType.add(ContentBlockerTriggerLoadType.fromValue(type));
|
||||
});
|
||||
|
||||
return ContentBlockerTrigger(
|
||||
map["url-filter"],
|
||||
urlFilterIsCaseSensitive: map["url-filter-is-case-sensitive"],
|
||||
ifDomain: List<String>.from(map["if-domain"] ?? []),
|
||||
unlessDomain: List<String>.from(map["unless-domain"] ?? []),
|
||||
resourceType: resourceType,
|
||||
loadType: loadType,
|
||||
ifTopUrl: List<String>.from(map["if-top-url"] ?? []),
|
||||
unlessTopUrl: List<String>.from(map["unless-top-url"] ?? [])
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class ContentBlockerActionType {
|
||||
final String _value;
|
||||
const ContentBlockerActionType._internal(this._value);
|
||||
static ContentBlockerActionType fromValue(String value) {
|
||||
return (["block", "css-display-none", "make-https"].contains(value)) ? ContentBlockerActionType._internal(value) : null;
|
||||
}
|
||||
toValue() => _value;
|
||||
|
||||
static const BLOCK = const ContentBlockerActionType._internal('block');
|
||||
@ -127,4 +174,11 @@ class ContentBlockerAction {
|
||||
|
||||
return map;
|
||||
}
|
||||
|
||||
static ContentBlockerAction fromMap(Map<String, dynamic> map) {
|
||||
return ContentBlockerAction(
|
||||
ContentBlockerActionType.fromValue(map["type"]),
|
||||
selector: map["selector"]
|
||||
);
|
||||
}
|
||||
}
|
@ -1,5 +1,6 @@
|
||||
import 'dart:async';
|
||||
import 'dart:collection';
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_inappbrowser/src/webview_options.dart';
|
||||
@ -102,14 +103,22 @@ class InAppBrowser {
|
||||
/// - __allowsInlineMediaPlayback__: Set to `true` to allow HTML5 media playback to appear inline within the screen layout, using browser-supplied controls rather than native controls. For this to work, add the `webkit-playsinline` attribute to any `<video>` elements. The default value is `false`.
|
||||
/// - __allowsPictureInPictureMediaPlayback__: Set to `true` to allow HTML5 videos play picture-in-picture. The default value is `true`.
|
||||
/// - __spinner__: Set to `false` to hide the spinner when the WebView is loading a page. The default value is `true`.
|
||||
Future<void> open({String url = "about:blank", Map<String, String> headers = const {}, List<BrowserOptions> options = const []}) async {
|
||||
Future<void> open({String url = "about:blank", Map<String, String> headers = const {}, InAppBrowserClassOptions options}) async {
|
||||
assert(url != null && url.isNotEmpty);
|
||||
this.throwIsAlreadyOpened(message: 'Cannot open $url!');
|
||||
|
||||
Map<String, dynamic> optionsMap = {};
|
||||
options.forEach((webViewOption) {
|
||||
optionsMap.addAll(webViewOption.toMap());
|
||||
});
|
||||
|
||||
optionsMap.addAll(options.inAppBrowserOptions?.toMap() ?? {});
|
||||
optionsMap.addAll(options.inAppWebViewWidgetOptions?.inAppWebViewOptions?.toMap() ?? {});
|
||||
if (Platform.isAndroid) {
|
||||
optionsMap.addAll(options.androidInAppBrowserOptions?.toMap() ?? {});
|
||||
optionsMap.addAll(options.inAppWebViewWidgetOptions?.androidInAppWebViewOptions?.toMap() ?? {});
|
||||
}
|
||||
else if (Platform.isIOS) {
|
||||
optionsMap.addAll(options.iosInAppBrowserOptions?.toMap() ?? {});
|
||||
optionsMap.addAll(options.inAppWebViewWidgetOptions?.iosInAppWebViewOptions?.toMap() ?? {});
|
||||
}
|
||||
|
||||
Map<String, dynamic> args = <String, dynamic>{};
|
||||
args.putIfAbsent('uuid', () => uuid);
|
||||
@ -140,7 +149,7 @@ class InAppBrowser {
|
||||
/// uses-material-design: true
|
||||
///
|
||||
/// assets:
|
||||
/// - assets/index.html
|
||||
/// - assets/t-rex.html
|
||||
/// - assets/css/
|
||||
/// - assets/images/
|
||||
///
|
||||
@ -149,17 +158,25 @@ class InAppBrowser {
|
||||
///Example of a `main.dart` file:
|
||||
///```dart
|
||||
///...
|
||||
///inAppBrowser.openFile("assets/index.html");
|
||||
///inAppBrowser.openFile("assets/t-rex.html");
|
||||
///...
|
||||
///```
|
||||
Future<void> openFile(String assetFilePath, {Map<String, String> headers = const {}, List<BrowserOptions> options = const []}) async {
|
||||
Future<void> openFile(String assetFilePath, {Map<String, String> headers = const {}, InAppBrowserClassOptions options}) async {
|
||||
assert(assetFilePath != null && assetFilePath.isNotEmpty);
|
||||
this.throwIsAlreadyOpened(message: 'Cannot open $assetFilePath!');
|
||||
|
||||
Map<String, dynamic> optionsMap = {};
|
||||
options.forEach((webViewOption) {
|
||||
optionsMap.addAll(webViewOption.toMap());
|
||||
});
|
||||
|
||||
optionsMap.addAll(options.inAppBrowserOptions?.toMap() ?? {});
|
||||
optionsMap.addAll(options.inAppWebViewWidgetOptions?.inAppWebViewOptions?.toMap() ?? {});
|
||||
if (Platform.isAndroid) {
|
||||
optionsMap.addAll(options.androidInAppBrowserOptions?.toMap() ?? {});
|
||||
optionsMap.addAll(options.inAppWebViewWidgetOptions?.androidInAppWebViewOptions?.toMap() ?? {});
|
||||
}
|
||||
else if (Platform.isIOS) {
|
||||
optionsMap.addAll(options.iosInAppBrowserOptions?.toMap() ?? {});
|
||||
optionsMap.addAll(options.inAppWebViewWidgetOptions?.iosInAppWebViewOptions?.toMap() ?? {});
|
||||
}
|
||||
|
||||
Map<String, dynamic> args = <String, dynamic>{};
|
||||
args.putIfAbsent('uuid', () => uuid);
|
||||
@ -176,13 +193,21 @@ class InAppBrowser {
|
||||
///Opens a new [InAppBrowser] instance with [data] as a content, using [baseUrl] as the base URL for it.
|
||||
///The [mimeType] parameter specifies the format of the data.
|
||||
///The [encoding] parameter specifies the encoding of the data.
|
||||
Future<void> openData(String data, {String mimeType = "text/html", String encoding = "utf8", String baseUrl = "about:blank", List<BrowserOptions> options = const []}) async {
|
||||
Future<void> openData(String data, {String mimeType = "text/html", String encoding = "utf8", String baseUrl = "about:blank", InAppBrowserClassOptions options}) async {
|
||||
assert(data != null);
|
||||
|
||||
Map<String, dynamic> optionsMap = {};
|
||||
options.forEach((webViewOption) {
|
||||
optionsMap.addAll(webViewOption.toMap());
|
||||
});
|
||||
|
||||
optionsMap.addAll(options.inAppBrowserOptions?.toMap() ?? {});
|
||||
optionsMap.addAll(options.inAppWebViewWidgetOptions?.inAppWebViewOptions?.toMap() ?? {});
|
||||
if (Platform.isAndroid) {
|
||||
optionsMap.addAll(options.androidInAppBrowserOptions?.toMap() ?? {});
|
||||
optionsMap.addAll(options.inAppWebViewWidgetOptions?.androidInAppWebViewOptions?.toMap() ?? {});
|
||||
}
|
||||
else if (Platform.isIOS) {
|
||||
optionsMap.addAll(options.iosInAppBrowserOptions?.toMap() ?? {});
|
||||
optionsMap.addAll(options.inAppWebViewWidgetOptions?.iosInAppWebViewOptions?.toMap() ?? {});
|
||||
}
|
||||
|
||||
Map<String, dynamic> args = <String, dynamic>{};
|
||||
args.putIfAbsent('uuid', () => uuid);
|
||||
@ -246,13 +271,21 @@ class InAppBrowser {
|
||||
}
|
||||
|
||||
///Sets the [InAppBrowser] options with the new [options] and evaluates them.
|
||||
Future<void> setOptions(List<BrowserOptions> options) async {
|
||||
Future<void> setOptions(InAppBrowserClassOptions options) async {
|
||||
this.throwIsNotOpened();
|
||||
|
||||
Map<String, dynamic> optionsMap = {};
|
||||
options.forEach((webViewOption) {
|
||||
optionsMap.addAll(webViewOption.toMap());
|
||||
});
|
||||
|
||||
optionsMap.addAll(options.inAppBrowserOptions?.toMap() ?? {});
|
||||
optionsMap.addAll(options.inAppWebViewWidgetOptions?.inAppWebViewOptions?.toMap() ?? {});
|
||||
if (Platform.isAndroid) {
|
||||
optionsMap.addAll(options.androidInAppBrowserOptions?.toMap() ?? {});
|
||||
optionsMap.addAll(options.inAppWebViewWidgetOptions?.androidInAppWebViewOptions?.toMap() ?? {});
|
||||
}
|
||||
else if (Platform.isIOS) {
|
||||
optionsMap.addAll(options.iosInAppBrowserOptions?.toMap() ?? {});
|
||||
optionsMap.addAll(options.inAppWebViewWidgetOptions?.iosInAppWebViewOptions?.toMap() ?? {});
|
||||
}
|
||||
|
||||
Map<String, dynamic> args = <String, dynamic>{};
|
||||
args.putIfAbsent('uuid', () => uuid);
|
||||
@ -262,15 +295,29 @@ class InAppBrowser {
|
||||
}
|
||||
|
||||
///Gets the current [InAppBrowser] options as a `Map`. Returns `null` if the options are not setted yet.
|
||||
Future<Map<String, dynamic>> getOptions() async {
|
||||
Future<InAppBrowserClassOptions> getOptions() async {
|
||||
this.throwIsNotOpened();
|
||||
Map<String, dynamic> args = <String, dynamic>{};
|
||||
args.putIfAbsent('uuid', () => uuid);
|
||||
args.putIfAbsent('optionsType', () => "InAppBrowserOptions");
|
||||
|
||||
InAppBrowserClassOptions inAppBrowserClassOptions = InAppBrowserClassOptions();
|
||||
Map<dynamic, dynamic> options = await ChannelManager.channel.invokeMethod('getOptions', args);
|
||||
if (options != null)
|
||||
if (options != null) {
|
||||
options = options.cast<String, dynamic>();
|
||||
return options;
|
||||
inAppBrowserClassOptions.inAppBrowserOptions = InAppBrowserOptions.fromMap(options);
|
||||
inAppBrowserClassOptions.inAppWebViewWidgetOptions.inAppWebViewOptions = InAppWebViewOptions.fromMap(options);
|
||||
if (Platform.isAndroid) {
|
||||
inAppBrowserClassOptions.androidInAppBrowserOptions = AndroidInAppBrowserOptions.fromMap(options);
|
||||
inAppBrowserClassOptions.inAppWebViewWidgetOptions.androidInAppWebViewOptions = AndroidInAppWebViewOptions.fromMap(options);
|
||||
}
|
||||
else if (Platform.isIOS) {
|
||||
inAppBrowserClassOptions.iosInAppBrowserOptions = IosInAppBrowserOptions.fromMap(options);
|
||||
inAppBrowserClassOptions.inAppWebViewWidgetOptions.iosInAppWebViewOptions = IosInAppWebViewOptions.fromMap(options);
|
||||
}
|
||||
}
|
||||
|
||||
return inAppBrowserClassOptions;
|
||||
}
|
||||
|
||||
///Returns `true` if the [InAppBrowser] instance is opened, otherwise `false`.
|
||||
@ -323,7 +370,7 @@ class InAppBrowser {
|
||||
///Event fires when the [InAppBrowser] webview loads a resource.
|
||||
///
|
||||
///**NOTE**: In order to be able to listen this event, you need to set `useOnLoadResource` option to `true`.
|
||||
void onLoadResource(WebResourceResponse response) {
|
||||
void onLoadResource(LoadedResource resource) {
|
||||
|
||||
}
|
||||
|
||||
|
@ -45,7 +45,7 @@ class InAppLocalhostServer {
|
||||
var body = List<int>();
|
||||
var path = request.requestedUri.path;
|
||||
path = (path.startsWith('/')) ? path.substring(1) : path;
|
||||
path += (path.endsWith('/')) ? 'index.html' : '';
|
||||
path += (path.endsWith('/')) ? 't-rex.html' : '';
|
||||
|
||||
try {
|
||||
body = (await rootBundle.load(path))
|
||||
|
@ -112,7 +112,7 @@ class InAppWebView extends StatefulWidget {
|
||||
///**NOTE**: In order to be able to listen this event, you need to set `useOnLoadResource` option to `true`.
|
||||
///
|
||||
///**NOTE only for Android**: to be able to listen this event, you need also the enable javascript.
|
||||
final void Function(InAppWebViewController controller, WebResourceResponse response) onLoadResource;
|
||||
final void Function(InAppWebViewController controller, LoadedResource resource) onLoadResource;
|
||||
|
||||
///Event fires when the [InAppWebView] scrolls.
|
||||
///
|
||||
@ -207,7 +207,7 @@ class InAppWebView extends StatefulWidget {
|
||||
///Initial headers that will be used.
|
||||
final Map<String, String> initialHeaders;
|
||||
///Initial options that will be used.
|
||||
final List<WebViewOptions> initialOptions;
|
||||
final InAppWebViewWidgetOptions initialOptions;
|
||||
/// `gestureRecognizers` specifies which gestures should be consumed by the web view.
|
||||
/// It is possible for other gesture recognizers to be competing with the web view on pointer
|
||||
/// events, e.g if the web view is inside a [ListView] the [ListView] will want to handle
|
||||
@ -223,7 +223,7 @@ class InAppWebView extends StatefulWidget {
|
||||
this.initialFile,
|
||||
this.initialData,
|
||||
this.initialHeaders = const {},
|
||||
this.initialOptions = const [],
|
||||
this.initialOptions,
|
||||
this.onWebViewCreated,
|
||||
this.onLoadStart,
|
||||
this.onLoadStop,
|
||||
@ -259,10 +259,11 @@ class _InAppWebViewState extends State<InAppWebView> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
Map<String, dynamic> initialOptions = {};
|
||||
widget.initialOptions.forEach((webViewOption) {
|
||||
if ((Platform.isAndroid && webViewOption is AndroidOptions) || (Platform.isIOS && webViewOption is iOSOptions))
|
||||
initialOptions.addAll(webViewOption.toMap());
|
||||
});
|
||||
initialOptions.addAll(widget.initialOptions.inAppWebViewOptions?.toMap() ?? {});
|
||||
if (Platform.isAndroid)
|
||||
initialOptions.addAll(widget.initialOptions.androidInAppWebViewOptions?.toMap() ?? {});
|
||||
else if (Platform.isIOS)
|
||||
initialOptions.addAll(widget.initialOptions.iosInAppWebViewOptions?.toMap() ?? {});
|
||||
|
||||
if (defaultTargetPlatform == TargetPlatform.android) {
|
||||
return AndroidView(
|
||||
@ -404,7 +405,7 @@ class InAppWebViewController {
|
||||
double startTime = call.arguments["startTime"];
|
||||
double duration = call.arguments["duration"];
|
||||
|
||||
var response = new WebResourceResponse(initiatorType, url, startTime, duration);
|
||||
var response = new LoadedResource(initiatorType, url, startTime, duration);
|
||||
|
||||
if (_widget != null && _widget.onLoadResource != null)
|
||||
_widget.onLoadResource(this, response);
|
||||
@ -606,8 +607,8 @@ class InAppWebViewController {
|
||||
///- downloading it using an `HttpClient` through the WebView's current url.
|
||||
Future<String> getHtml() async {
|
||||
var html = "";
|
||||
Map<String, dynamic> options = await getOptions();
|
||||
if (options != null && options["javaScriptEnabled"] == true) {
|
||||
InAppWebViewWidgetOptions options = await getOptions();
|
||||
if (options != null && options.inAppWebViewOptions.javaScriptEnabled == true) {
|
||||
html = await injectScriptCode("window.document.getElementsByTagName('html')[0].outerHTML;");
|
||||
if (html.isNotEmpty)
|
||||
return html;
|
||||
@ -803,7 +804,7 @@ class InAppWebViewController {
|
||||
/// uses-material-design: true
|
||||
///
|
||||
/// assets:
|
||||
/// - assets/index.html
|
||||
/// - assets/t-rex.html
|
||||
/// - assets/css/
|
||||
/// - assets/images/
|
||||
///
|
||||
@ -812,7 +813,7 @@ class InAppWebViewController {
|
||||
///Example of a `main.dart` file:
|
||||
///```dart
|
||||
///...
|
||||
///inAppBrowser.loadFile("assets/index.html");
|
||||
///inAppBrowser.loadFile("assets/t-rex.html");
|
||||
///...
|
||||
///```
|
||||
Future<void> loadFile(String assetFilePath, {Map<String, String> headers = const {}}) async {
|
||||
@ -1042,27 +1043,44 @@ class InAppWebViewController {
|
||||
}
|
||||
|
||||
///Sets the [InAppWebView] options with the new [options] and evaluates them.
|
||||
Future<void> setOptions(Map<String, dynamic> options) async {
|
||||
Future<void> setOptions(InAppWebViewWidgetOptions options) async {
|
||||
Map<String, dynamic> args = <String, dynamic>{};
|
||||
if (_inAppBrowserUuid != null && _inAppBrowser != null) {
|
||||
_inAppBrowser.throwIsNotOpened();
|
||||
args.putIfAbsent('uuid', () => _inAppBrowserUuid);
|
||||
}
|
||||
args.putIfAbsent('options', () => options);
|
||||
|
||||
Map<String, dynamic> optionsMap = {};
|
||||
optionsMap.addAll(options.inAppWebViewOptions?.toMap() ?? {});
|
||||
if (Platform.isAndroid)
|
||||
optionsMap.addAll(options.androidInAppWebViewOptions?.toMap() ?? {});
|
||||
else if (Platform.isIOS)
|
||||
optionsMap.addAll(options.iosInAppWebViewOptions?.toMap() ?? {});
|
||||
|
||||
args.putIfAbsent('options', () => optionsMap);
|
||||
await _channel.invokeMethod('setOptions', args);
|
||||
}
|
||||
|
||||
///Gets the current [InAppWebView] options. Returns `null` if the options are not setted yet.
|
||||
Future<Map<String, dynamic>> getOptions() async {
|
||||
///Gets the current [InAppWebView] options. Returns the options with `null` value if they are not set yet.
|
||||
Future<InAppWebViewWidgetOptions> getOptions() async {
|
||||
Map<String, dynamic> args = <String, dynamic>{};
|
||||
if (_inAppBrowserUuid != null && _inAppBrowser != null) {
|
||||
_inAppBrowser.throwIsNotOpened();
|
||||
args.putIfAbsent('uuid', () => _inAppBrowserUuid);
|
||||
}
|
||||
|
||||
InAppWebViewWidgetOptions inAppWebViewWidgetOptions = InAppWebViewWidgetOptions();
|
||||
Map<dynamic, dynamic> options = await _channel.invokeMethod('getOptions', args);
|
||||
if (options != null)
|
||||
if (options != null) {
|
||||
options = options.cast<String, dynamic>();
|
||||
return options;
|
||||
inAppWebViewWidgetOptions.inAppWebViewOptions = InAppWebViewOptions.fromMap(options);
|
||||
if (Platform.isAndroid)
|
||||
inAppWebViewWidgetOptions.androidInAppWebViewOptions = AndroidInAppWebViewOptions.fromMap(options);
|
||||
else if (Platform.isIOS)
|
||||
inAppWebViewWidgetOptions.iosInAppWebViewOptions = IosInAppWebViewOptions.fromMap(options);
|
||||
}
|
||||
|
||||
return inAppWebViewWidgetOptions;
|
||||
}
|
||||
|
||||
///Gets the WebHistory for this WebView. This contains the back/forward list for use in querying each item in the history stack.
|
||||
@ -1230,4 +1248,14 @@ class InAppWebViewController {
|
||||
}
|
||||
await _channel.invokeMethod('clearMatches', args);
|
||||
}
|
||||
|
||||
///Gets the html (with javascript) of the Chromium's t-rex runner game. Used in combination with [getTRexRunnerCss()].
|
||||
Future<String> getTRexRunnerHtml() async {
|
||||
return await rootBundle.loadString("packages/flutter_inappbrowser/t_rex_runner/t-rex.html");
|
||||
}
|
||||
|
||||
///Gets the css of the Chromium's t-rex runner game. Used in combination with [getTRexRunnerHtml()].
|
||||
Future<String> getTRexRunnerCss() async {
|
||||
return await rootBundle.loadString("packages/flutter_inappbrowser/t_rex_runner/t-rex.css");
|
||||
}
|
||||
}
|
||||
|
@ -4,7 +4,8 @@ import 'dart:typed_data';
|
||||
import 'package:uuid/uuid.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'in_app_webview.dart';
|
||||
|
||||
import 'webview_options.dart';
|
||||
|
||||
var uuidGenerator = new Uuid();
|
||||
|
||||
@ -27,7 +28,7 @@ class ConsoleMessageLevel {
|
||||
final int _value;
|
||||
const ConsoleMessageLevel._internal(this._value);
|
||||
static ConsoleMessageLevel fromValue(int value) {
|
||||
if (value >= 0 && value <= 4)
|
||||
if (value != null && value >= 0 && value <= 4)
|
||||
return ConsoleMessageLevel._internal(value);
|
||||
return null;
|
||||
}
|
||||
@ -42,7 +43,7 @@ class ConsoleMessageLevel {
|
||||
|
||||
///Public class representing a resource response of the [InAppBrowser] WebView.
|
||||
///It is used by the method [InAppBrowser.onLoadResource()].
|
||||
class WebResourceResponse {
|
||||
class LoadedResource {
|
||||
|
||||
///A string representing the type of resource.
|
||||
String initiatorType;
|
||||
@ -53,27 +54,58 @@ class WebResourceResponse {
|
||||
///Returns the [DOMHighResTimeStamp](https://developer.mozilla.org/en-US/docs/Web/API/DOMHighResTimeStamp) duration to fetch a resource.
|
||||
double duration;
|
||||
|
||||
WebResourceResponse(this.initiatorType, this.url, this.startTime, this.duration);
|
||||
LoadedResource(this.initiatorType, this.url, this.startTime, this.duration);
|
||||
|
||||
}
|
||||
|
||||
///Public class representing the response returned by the [onLoadResourceCustomScheme()] event of [InAppWebView].
|
||||
/*
|
||||
///Public class representing a resource request of the WebView.
|
||||
///It is used by the event [shouldInterceptRequest()].
|
||||
class WebResourceRequest {
|
||||
|
||||
String url;
|
||||
Map<String, String> headers;
|
||||
String method;
|
||||
|
||||
WebResourceRequest({@required this.url, @required this.headers, @required this.method});
|
||||
|
||||
}
|
||||
|
||||
///Public class representing a resource response of the WebView.
|
||||
///It is used by the event [shouldInterceptRequest()].
|
||||
class WebResourceResponse {
|
||||
String contentType;
|
||||
String contentEncoding;
|
||||
Uint8List data;
|
||||
|
||||
WebResourceResponse({@required this.contentType, this.contentEncoding = "utf-8", @required this.data}): assert(contentType != null && contentEncoding != null && data != null);
|
||||
|
||||
Map<String, dynamic> toMap() {
|
||||
return {
|
||||
"contentType": contentType,
|
||||
"contentEncoding": contentEncoding,
|
||||
"data": data
|
||||
};
|
||||
}
|
||||
}*/
|
||||
|
||||
///Public class representing the response returned by the [onLoadResourceCustomScheme()] event.
|
||||
///It allows to load a specific resource. The resource data must be encoded to `base64`.
|
||||
class CustomSchemeResponse {
|
||||
///Data enconded to 'base64'.
|
||||
String base64data;
|
||||
Uint8List data;
|
||||
///Content-Type of the data, such as `image/png`.
|
||||
String contentType;
|
||||
///Content-Enconding of the data, such as `utf-8`.
|
||||
String contentEnconding;
|
||||
|
||||
CustomSchemeResponse(this.base64data, this.contentType, {this.contentEnconding = 'utf-8'});
|
||||
CustomSchemeResponse(this.data, this.contentType, {this.contentEnconding = 'utf-8'});
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
return {
|
||||
'content-type': this.contentType,
|
||||
'content-encoding': this.contentEnconding,
|
||||
'base64data': this.base64data
|
||||
'data': this.data
|
||||
};
|
||||
}
|
||||
}
|
||||
@ -244,7 +276,7 @@ class SafeBrowsingThreat {
|
||||
final int _value;
|
||||
const SafeBrowsingThreat._internal(this._value);
|
||||
static SafeBrowsingThreat fromValue(int value) {
|
||||
if (value >= 0 && value <= 4)
|
||||
if (value != null && value >= 0 && value <= 4)
|
||||
return SafeBrowsingThreat._internal(value);
|
||||
return null;
|
||||
}
|
||||
@ -430,6 +462,11 @@ class Favicon {
|
||||
class AndroidInAppWebViewCacheMode {
|
||||
final int _value;
|
||||
const AndroidInAppWebViewCacheMode._internal(this._value);
|
||||
static AndroidInAppWebViewCacheMode fromValue(int value) {
|
||||
if (value != null && value >= 0 && value <= 3)
|
||||
return AndroidInAppWebViewCacheMode._internal(value);
|
||||
return null;
|
||||
}
|
||||
toValue() => _value;
|
||||
|
||||
static const LOAD_DEFAULT = const AndroidInAppWebViewCacheMode._internal(-1);
|
||||
@ -442,6 +479,11 @@ class AndroidInAppWebViewCacheMode {
|
||||
class AndroidInAppWebViewModeMenuItem {
|
||||
final int _value;
|
||||
const AndroidInAppWebViewModeMenuItem._internal(this._value);
|
||||
static AndroidInAppWebViewModeMenuItem fromValue(int value) {
|
||||
if (value != null && value >= 0 && value <= 4)
|
||||
return AndroidInAppWebViewModeMenuItem._internal(value);
|
||||
return null;
|
||||
}
|
||||
toValue() => _value;
|
||||
|
||||
static const MENU_ITEM_NONE = const AndroidInAppWebViewModeMenuItem._internal(0);
|
||||
@ -454,6 +496,11 @@ class AndroidInAppWebViewModeMenuItem {
|
||||
class AndroidInAppWebViewForceDark {
|
||||
final int _value;
|
||||
const AndroidInAppWebViewForceDark._internal(this._value);
|
||||
static AndroidInAppWebViewForceDark fromValue(int value) {
|
||||
if (value != null && value >= 0 && value <= 2)
|
||||
return AndroidInAppWebViewForceDark._internal(value);
|
||||
return null;
|
||||
}
|
||||
toValue() => _value;
|
||||
|
||||
static const FORCE_DARK_OFF = const AndroidInAppWebViewForceDark._internal(0);
|
||||
@ -465,6 +512,9 @@ class AndroidInAppWebViewForceDark {
|
||||
class AndroidInAppWebViewLayoutAlgorithm {
|
||||
final String _value;
|
||||
const AndroidInAppWebViewLayoutAlgorithm._internal(this._value);
|
||||
static AndroidInAppWebViewLayoutAlgorithm fromValue(String value) {
|
||||
return (["NORMAL", "TEXT_AUTOSIZING"].contains(value)) ? AndroidInAppWebViewLayoutAlgorithm._internal(value) : null;
|
||||
}
|
||||
toValue() => _value;
|
||||
|
||||
static const NORMAL = const AndroidInAppWebViewLayoutAlgorithm._internal("NORMAL");
|
||||
@ -475,6 +525,11 @@ class AndroidInAppWebViewLayoutAlgorithm {
|
||||
class AndroidInAppWebViewMixedContentMode {
|
||||
final int _value;
|
||||
const AndroidInAppWebViewMixedContentMode._internal(this._value);
|
||||
static AndroidInAppWebViewMixedContentMode fromValue(int value) {
|
||||
if (value != null && value >= 0 && value <= 2)
|
||||
return AndroidInAppWebViewMixedContentMode._internal(value);
|
||||
return null;
|
||||
}
|
||||
toValue() => _value;
|
||||
|
||||
static const MIXED_CONTENT_ALWAYS_ALLOW = const AndroidInAppWebViewMixedContentMode._internal(0);
|
||||
@ -483,37 +538,51 @@ class AndroidInAppWebViewMixedContentMode {
|
||||
}
|
||||
|
||||
///
|
||||
class iOSInAppWebViewSelectionGranularity {
|
||||
class IosInAppWebViewSelectionGranularity {
|
||||
final int _value;
|
||||
const iOSInAppWebViewSelectionGranularity._internal(this._value);
|
||||
const IosInAppWebViewSelectionGranularity._internal(this._value);
|
||||
static IosInAppWebViewSelectionGranularity fromValue(int value) {
|
||||
if (value != null && value >= 0 && value <= 1)
|
||||
return IosInAppWebViewSelectionGranularity._internal(value);
|
||||
return null;
|
||||
}
|
||||
toValue() => _value;
|
||||
|
||||
static const CHARACTER = const iOSInAppWebViewSelectionGranularity._internal(0);
|
||||
static const DYNAMIC = const iOSInAppWebViewSelectionGranularity._internal(1);
|
||||
static const CHARACTER = const IosInAppWebViewSelectionGranularity._internal(0);
|
||||
static const DYNAMIC = const IosInAppWebViewSelectionGranularity._internal(1);
|
||||
}
|
||||
|
||||
///
|
||||
class iOSInAppWebViewDataDetectorTypes {
|
||||
class IosInAppWebViewDataDetectorTypes {
|
||||
final String _value;
|
||||
const iOSInAppWebViewDataDetectorTypes._internal(this._value);
|
||||
const IosInAppWebViewDataDetectorTypes._internal(this._value);
|
||||
static IosInAppWebViewDataDetectorTypes fromValue(String value) {
|
||||
return (["NONE", "PHONE_NUMBER", "LINK", "ADDRESS", "CALENDAR_EVENT", "TRACKING_NUMBER",
|
||||
"TRACKING_NUMBER", "FLIGHT_NUMBER", "LOOKUP_SUGGESTION", "SPOTLIGHT_SUGGESTION", "ALL"].contains(value)) ? IosInAppWebViewDataDetectorTypes._internal(value) : null;
|
||||
}
|
||||
toValue() => _value;
|
||||
|
||||
static const NONE = const iOSInAppWebViewDataDetectorTypes._internal("NONE");
|
||||
static const PHONE_NUMBER = const iOSInAppWebViewDataDetectorTypes._internal("PHONE_NUMBER");
|
||||
static const LINK = const iOSInAppWebViewDataDetectorTypes._internal("LINK");
|
||||
static const ADDRESS = const iOSInAppWebViewDataDetectorTypes._internal("ADDRESS");
|
||||
static const CALENDAR_EVENT = const iOSInAppWebViewDataDetectorTypes._internal("CALENDAR_EVENT");
|
||||
static const TRACKING_NUMBER = const iOSInAppWebViewDataDetectorTypes._internal("TRACKING_NUMBER");
|
||||
static const FLIGHT_NUMBER = const iOSInAppWebViewDataDetectorTypes._internal("FLIGHT_NUMBER");
|
||||
static const LOOKUP_SUGGESTION = const iOSInAppWebViewDataDetectorTypes._internal("LOOKUP_SUGGESTION");
|
||||
static const SPOTLIGHT_SUGGESTION = const iOSInAppWebViewDataDetectorTypes._internal("SPOTLIGHT_SUGGESTION");
|
||||
static const ALL = const iOSInAppWebViewDataDetectorTypes._internal("ALL");
|
||||
static const NONE = const IosInAppWebViewDataDetectorTypes._internal("NONE");
|
||||
static const PHONE_NUMBER = const IosInAppWebViewDataDetectorTypes._internal("PHONE_NUMBER");
|
||||
static const LINK = const IosInAppWebViewDataDetectorTypes._internal("LINK");
|
||||
static const ADDRESS = const IosInAppWebViewDataDetectorTypes._internal("ADDRESS");
|
||||
static const CALENDAR_EVENT = const IosInAppWebViewDataDetectorTypes._internal("CALENDAR_EVENT");
|
||||
static const TRACKING_NUMBER = const IosInAppWebViewDataDetectorTypes._internal("TRACKING_NUMBER");
|
||||
static const FLIGHT_NUMBER = const IosInAppWebViewDataDetectorTypes._internal("FLIGHT_NUMBER");
|
||||
static const LOOKUP_SUGGESTION = const IosInAppWebViewDataDetectorTypes._internal("LOOKUP_SUGGESTION");
|
||||
static const SPOTLIGHT_SUGGESTION = const IosInAppWebViewDataDetectorTypes._internal("SPOTLIGHT_SUGGESTION");
|
||||
static const ALL = const IosInAppWebViewDataDetectorTypes._internal("ALL");
|
||||
}
|
||||
|
||||
///
|
||||
class InAppWebViewUserPreferredContentMode {
|
||||
final int _value;
|
||||
const InAppWebViewUserPreferredContentMode._internal(this._value);
|
||||
static InAppWebViewUserPreferredContentMode fromValue(int value) {
|
||||
if (value != null && value >= 0 && value <= 2)
|
||||
return InAppWebViewUserPreferredContentMode._internal(value);
|
||||
return null;
|
||||
}
|
||||
toValue() => _value;
|
||||
|
||||
static const RECOMMENDED = const InAppWebViewUserPreferredContentMode._internal(0);
|
||||
@ -522,42 +591,84 @@ class InAppWebViewUserPreferredContentMode {
|
||||
}
|
||||
|
||||
///
|
||||
class iOSWebViewOptionsPresentationStyle {
|
||||
class IosWebViewOptionsPresentationStyle {
|
||||
final int _value;
|
||||
const iOSWebViewOptionsPresentationStyle._internal(this._value);
|
||||
const IosWebViewOptionsPresentationStyle._internal(this._value);
|
||||
static IosWebViewOptionsPresentationStyle fromValue(int value) {
|
||||
if (value != null && value >= 0 && value <= 9)
|
||||
return IosWebViewOptionsPresentationStyle._internal(value);
|
||||
return null;
|
||||
}
|
||||
toValue() => _value;
|
||||
|
||||
static const FULL_SCREEN = const iOSWebViewOptionsPresentationStyle._internal(0);
|
||||
static const PAGE_SHEET = const iOSWebViewOptionsPresentationStyle._internal(1);
|
||||
static const FORM_SHEET = const iOSWebViewOptionsPresentationStyle._internal(2);
|
||||
static const CURRENT_CONTEXT = const iOSWebViewOptionsPresentationStyle._internal(3);
|
||||
static const CUSTOM = const iOSWebViewOptionsPresentationStyle._internal(4);
|
||||
static const OVER_FULL_SCREEN = const iOSWebViewOptionsPresentationStyle._internal(5);
|
||||
static const OVER_CURRENT_CONTEXT = const iOSWebViewOptionsPresentationStyle._internal(6);
|
||||
static const POPOVER = const iOSWebViewOptionsPresentationStyle._internal(7);
|
||||
static const NONE = const iOSWebViewOptionsPresentationStyle._internal(8);
|
||||
static const AUTOMATIC = const iOSWebViewOptionsPresentationStyle._internal(9);
|
||||
static const FULL_SCREEN = const IosWebViewOptionsPresentationStyle._internal(0);
|
||||
static const PAGE_SHEET = const IosWebViewOptionsPresentationStyle._internal(1);
|
||||
static const FORM_SHEET = const IosWebViewOptionsPresentationStyle._internal(2);
|
||||
static const CURRENT_CONTEXT = const IosWebViewOptionsPresentationStyle._internal(3);
|
||||
static const CUSTOM = const IosWebViewOptionsPresentationStyle._internal(4);
|
||||
static const OVER_FULL_SCREEN = const IosWebViewOptionsPresentationStyle._internal(5);
|
||||
static const OVER_CURRENT_CONTEXT = const IosWebViewOptionsPresentationStyle._internal(6);
|
||||
static const POPOVER = const IosWebViewOptionsPresentationStyle._internal(7);
|
||||
static const NONE = const IosWebViewOptionsPresentationStyle._internal(8);
|
||||
static const AUTOMATIC = const IosWebViewOptionsPresentationStyle._internal(9);
|
||||
}
|
||||
|
||||
///
|
||||
class iOSWebViewOptionsTransitionStyle {
|
||||
class IosWebViewOptionsTransitionStyle {
|
||||
final int _value;
|
||||
const iOSWebViewOptionsTransitionStyle._internal(this._value);
|
||||
const IosWebViewOptionsTransitionStyle._internal(this._value);
|
||||
static IosWebViewOptionsTransitionStyle fromValue(int value) {
|
||||
if (value != null && value >= 0 && value <= 3)
|
||||
return IosWebViewOptionsTransitionStyle._internal(value);
|
||||
return null;
|
||||
}
|
||||
toValue() => _value;
|
||||
|
||||
static const COVER_VERTICAL = const iOSWebViewOptionsTransitionStyle._internal(0);
|
||||
static const FLIP_HORIZONTAL = const iOSWebViewOptionsTransitionStyle._internal(1);
|
||||
static const CROSS_DISSOLVE = const iOSWebViewOptionsTransitionStyle._internal(2);
|
||||
static const PARTIAL_CURL = const iOSWebViewOptionsTransitionStyle._internal(3);
|
||||
static const COVER_VERTICAL = const IosWebViewOptionsTransitionStyle._internal(0);
|
||||
static const FLIP_HORIZONTAL = const IosWebViewOptionsTransitionStyle._internal(1);
|
||||
static const CROSS_DISSOLVE = const IosWebViewOptionsTransitionStyle._internal(2);
|
||||
static const PARTIAL_CURL = const IosWebViewOptionsTransitionStyle._internal(3);
|
||||
}
|
||||
|
||||
///
|
||||
class iOSSafariOptionsDismissButtonStyle {
|
||||
class IosSafariOptionsDismissButtonStyle {
|
||||
final int _value;
|
||||
const iOSSafariOptionsDismissButtonStyle._internal(this._value);
|
||||
const IosSafariOptionsDismissButtonStyle._internal(this._value);
|
||||
static IosSafariOptionsDismissButtonStyle fromValue(int value) {
|
||||
if (value != null && value >= 0 && value <= 2)
|
||||
return IosSafariOptionsDismissButtonStyle._internal(value);
|
||||
return null;
|
||||
}
|
||||
toValue() => _value;
|
||||
|
||||
static const DONE = const iOSSafariOptionsDismissButtonStyle._internal(0);
|
||||
static const CLOSE = const iOSSafariOptionsDismissButtonStyle._internal(1);
|
||||
static const CANCEL = const iOSSafariOptionsDismissButtonStyle._internal(2);
|
||||
static const DONE = const IosSafariOptionsDismissButtonStyle._internal(0);
|
||||
static const CLOSE = const IosSafariOptionsDismissButtonStyle._internal(1);
|
||||
static const CANCEL = const IosSafariOptionsDismissButtonStyle._internal(2);
|
||||
}
|
||||
|
||||
///
|
||||
class InAppWebViewWidgetOptions {
|
||||
InAppWebViewOptions inAppWebViewOptions;
|
||||
AndroidInAppWebViewOptions androidInAppWebViewOptions;
|
||||
IosInAppWebViewOptions iosInAppWebViewOptions;
|
||||
|
||||
InAppWebViewWidgetOptions({this.inAppWebViewOptions, this.androidInAppWebViewOptions, this.iosInAppWebViewOptions});
|
||||
}
|
||||
|
||||
///
|
||||
class InAppBrowserClassOptions {
|
||||
InAppBrowserOptions inAppBrowserOptions;
|
||||
AndroidInAppBrowserOptions androidInAppBrowserOptions;
|
||||
IosInAppBrowserOptions iosInAppBrowserOptions;
|
||||
InAppWebViewWidgetOptions inAppWebViewWidgetOptions;
|
||||
|
||||
InAppBrowserClassOptions({this.inAppBrowserOptions, this.androidInAppBrowserOptions, this.iosInAppBrowserOptions, this.inAppWebViewWidgetOptions});
|
||||
}
|
||||
|
||||
///
|
||||
class ChromeSafariBrowserClassOptions {
|
||||
AndroidChromeCustomTabsOptions androidChromeCustomTabsOptions;
|
||||
IosSafariOptions iosSafariOptions;
|
||||
|
||||
ChromeSafariBrowserClassOptions({this.androidChromeCustomTabsOptions, this.iosSafariOptions});
|
||||
}
|
@ -4,21 +4,39 @@ import 'types.dart';
|
||||
import 'package:flutter_inappbrowser/src/content_blocker.dart';
|
||||
|
||||
class AndroidOptions {}
|
||||
class iOSOptions {}
|
||||
class IosOptions {}
|
||||
|
||||
class WebViewOptions {
|
||||
Map<String, dynamic> toMap() {
|
||||
return {};
|
||||
}
|
||||
|
||||
static WebViewOptions fromMap(Map<String, dynamic> map) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
class BrowserOptions {
|
||||
Map<String, dynamic> toMap() {
|
||||
return {};
|
||||
}
|
||||
|
||||
static BrowserOptions fromMap(Map<String, dynamic> map) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
class InAppWebViewOptions implements WebViewOptions, BrowserOptions, AndroidOptions, iOSOptions {
|
||||
class ChromeSafariBrowserOptions {
|
||||
Map<String, dynamic> toMap() {
|
||||
return {};
|
||||
}
|
||||
|
||||
static ChromeSafariBrowserOptions fromMap(Map<String, dynamic> map) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
class InAppWebViewOptions implements WebViewOptions, BrowserOptions, AndroidOptions, IosOptions {
|
||||
bool useShouldOverrideUrlLoading;
|
||||
bool useOnLoadResource;
|
||||
bool useOnDownloadStart;
|
||||
@ -61,6 +79,7 @@ class InAppWebViewOptions implements WebViewOptions, BrowserOptions, AndroidOpti
|
||||
"clearCache": clearCache,
|
||||
"userAgent": userAgent,
|
||||
"javaScriptEnabled": javaScriptEnabled,
|
||||
"debuggingEnabled": debuggingEnabled,
|
||||
"javaScriptCanOpenWindowsAutomatically": javaScriptCanOpenWindowsAutomatically,
|
||||
"mediaPlaybackRequiresUserGesture": mediaPlaybackRequiresUserGesture,
|
||||
"textZoom": textZoom,
|
||||
@ -71,6 +90,37 @@ class InAppWebViewOptions implements WebViewOptions, BrowserOptions, AndroidOpti
|
||||
"preferredContentMode": preferredContentMode?.toValue()
|
||||
};
|
||||
}
|
||||
|
||||
@override
|
||||
static InAppWebViewOptions fromMap(Map<String, dynamic> map) {
|
||||
List<ContentBlocker> contentBlockers = [];
|
||||
List<dynamic> contentBlockersMapList = map["contentBlockers"];
|
||||
if (contentBlockersMapList != null) {
|
||||
contentBlockersMapList.forEach((contentBlocker) {
|
||||
contentBlockers.add(ContentBlocker.fromMap(
|
||||
Map<dynamic, Map<dynamic, dynamic>>.from(Map<dynamic, dynamic>.from(contentBlocker))
|
||||
));
|
||||
});
|
||||
}
|
||||
|
||||
InAppWebViewOptions options = new InAppWebViewOptions();
|
||||
options.useShouldOverrideUrlLoading = map["useShouldOverrideUrlLoading"];
|
||||
options.useOnLoadResource = map["useOnLoadResource"];
|
||||
options.useOnDownloadStart = map["useOnDownloadStart"];
|
||||
options.useOnTargetBlank = map["useOnTargetBlank"];
|
||||
options.clearCache = map["clearCache"];
|
||||
options.userAgent = map["userAgent"];
|
||||
options.javaScriptEnabled = map["javaScriptEnabled"];
|
||||
options.javaScriptCanOpenWindowsAutomatically = map["javaScriptCanOpenWindowsAutomatically"];
|
||||
options.mediaPlaybackRequiresUserGesture = map["mediaPlaybackRequiresUserGesture"];
|
||||
options.textZoom = map["textZoom"];
|
||||
options.verticalScrollBarEnabled = map["verticalScrollBarEnabled"];
|
||||
options.horizontalScrollBarEnabled = map["horizontalScrollBarEnabled"];
|
||||
options.resourceCustomSchemes = List<String>.from(map["resourceCustomSchemes"] ?? []);
|
||||
options.contentBlockers = contentBlockers;
|
||||
options.preferredContentMode = InAppWebViewUserPreferredContentMode.fromValue(map["preferredContentMode"]);
|
||||
return options;
|
||||
}
|
||||
}
|
||||
|
||||
class AndroidInAppWebViewOptions implements WebViewOptions, BrowserOptions, AndroidOptions {
|
||||
@ -165,9 +215,52 @@ class AndroidInAppWebViewOptions implements WebViewOptions, BrowserOptions, Andr
|
||||
"standardFontFamily": standardFontFamily
|
||||
};
|
||||
}
|
||||
|
||||
@override
|
||||
static AndroidInAppWebViewOptions fromMap(Map<String, dynamic> map) {
|
||||
AndroidInAppWebViewOptions options = new AndroidInAppWebViewOptions();
|
||||
options.clearSessionCache = map["clearSessionCache"];
|
||||
options.builtInZoomControls = map["builtInZoomControls"];
|
||||
options.displayZoomControls = map["displayZoomControls"];
|
||||
options.supportZoom = map["supportZoom"];
|
||||
options.databaseEnabled = map["databaseEnabled"];
|
||||
options.domStorageEnabled = map["domStorageEnabled"];
|
||||
options.useWideViewPort = map["useWideViewPort"];
|
||||
options.safeBrowsingEnabled = map["safeBrowsingEnabled"];
|
||||
options.transparentBackground = map["transparentBackground"];
|
||||
options.mixedContentMode = AndroidInAppWebViewMixedContentMode.fromValue(map["mixedContentMode"]);
|
||||
options.allowContentAccess = map["allowContentAccess"];
|
||||
options.allowFileAccess = map["allowFileAccess"];
|
||||
options.allowFileAccessFromFileURLs = map["allowFileAccessFromFileURLs"];
|
||||
options.allowUniversalAccessFromFileURLs = map["allowUniversalAccessFromFileURLs"];
|
||||
options.appCacheEnabled = map["appCacheEnabled"];
|
||||
options.appCachePath = map["appCachePath"];
|
||||
options.blockNetworkImage = map["blockNetworkImage"];
|
||||
options.blockNetworkLoads = map["blockNetworkLoads"];
|
||||
options.cacheMode = AndroidInAppWebViewCacheMode.fromValue(map["cacheMode"]);
|
||||
options.cursiveFontFamily = map["cursiveFontFamily"];
|
||||
options.defaultFixedFontSize = map["defaultFixedFontSize"];
|
||||
options.defaultFontSize = map["defaultFontSize"];
|
||||
options.defaultTextEncodingName = map["defaultTextEncodingName"];
|
||||
options.disabledActionModeMenuItems = AndroidInAppWebViewModeMenuItem.fromValue(map["disabledActionModeMenuItems"]);
|
||||
options.fantasyFontFamily = map["fantasyFontFamily"];
|
||||
options.fixedFontFamily = map["fixedFontFamily"];
|
||||
options.forceDark = AndroidInAppWebViewForceDark.fromValue(map["forceDark"]);
|
||||
options.geolocationEnabled = map["geolocationEnabled"];
|
||||
options.layoutAlgorithm = AndroidInAppWebViewLayoutAlgorithm.fromValue(map["layoutAlgorithm"]);
|
||||
options.loadWithOverviewMode = map["loadWithOverviewMode"];
|
||||
options.loadsImagesAutomatically = map["loadsImagesAutomatically"];
|
||||
options.minimumLogicalFontSize = map["minimumLogicalFontSize"];
|
||||
options.needInitialFocus = map["needInitialFocus"];
|
||||
options.offscreenPreRaster = map["offscreenPreRaster"];
|
||||
options.sansSerifFontFamily = map["sansSerifFontFamily"];
|
||||
options.serifFontFamily = map["serifFontFamily"];
|
||||
options.standardFontFamily = map["standardFontFamily"];
|
||||
return options;
|
||||
}
|
||||
}
|
||||
|
||||
class iOSInAppWebViewOptions implements WebViewOptions, BrowserOptions, iOSOptions {
|
||||
class IosInAppWebViewOptions implements WebViewOptions, BrowserOptions, IosOptions {
|
||||
bool disallowOverScroll;
|
||||
bool enableViewportScale;
|
||||
bool suppressesIncrementalRendering;
|
||||
@ -180,13 +273,13 @@ class iOSInAppWebViewOptions implements WebViewOptions, BrowserOptions, iOSOptio
|
||||
bool transparentBackground;
|
||||
String applicationNameForUserAgent;
|
||||
bool isFraudulentWebsiteWarningEnabled;
|
||||
iOSInAppWebViewSelectionGranularity selectionGranularity;
|
||||
List<iOSInAppWebViewDataDetectorTypes> dataDetectorTypes;
|
||||
IosInAppWebViewSelectionGranularity selectionGranularity;
|
||||
List<IosInAppWebViewDataDetectorTypes> dataDetectorTypes;
|
||||
|
||||
iOSInAppWebViewOptions({this.disallowOverScroll = false, this.enableViewportScale = false, this.suppressesIncrementalRendering = false, this.allowsAirPlayForMediaPlayback = true,
|
||||
IosInAppWebViewOptions({this.disallowOverScroll = false, this.enableViewportScale = false, this.suppressesIncrementalRendering = false, this.allowsAirPlayForMediaPlayback = true,
|
||||
this.allowsBackForwardNavigationGestures = true, this.allowsLinkPreview = true, this.ignoresViewportScaleLimits = false, this.allowsInlineMediaPlayback = false,
|
||||
this.allowsPictureInPictureMediaPlayback = true, this.transparentBackground = false, this.applicationNameForUserAgent = "", this.isFraudulentWebsiteWarningEnabled = true,
|
||||
this.selectionGranularity = iOSInAppWebViewSelectionGranularity.DYNAMIC, this.dataDetectorTypes = const [iOSInAppWebViewDataDetectorTypes.NONE]
|
||||
this.selectionGranularity = IosInAppWebViewSelectionGranularity.DYNAMIC, this.dataDetectorTypes = const [IosInAppWebViewDataDetectorTypes.NONE]
|
||||
});
|
||||
|
||||
@override
|
||||
@ -213,9 +306,35 @@ class iOSInAppWebViewOptions implements WebViewOptions, BrowserOptions, iOSOptio
|
||||
"dataDetectorTypes": dataDetectorTypesList
|
||||
};
|
||||
}
|
||||
|
||||
@override
|
||||
static IosInAppWebViewOptions fromMap(Map<String, dynamic> map) {
|
||||
List<IosInAppWebViewDataDetectorTypes> dataDetectorTypes = [];
|
||||
List<String> dataDetectorTypesList = List<String>.from(map["dataDetectorTypes"] ?? []);
|
||||
dataDetectorTypesList.forEach((dataDetectorType) {
|
||||
dataDetectorTypes.add(IosInAppWebViewDataDetectorTypes.fromValue(dataDetectorType));
|
||||
});
|
||||
|
||||
IosInAppWebViewOptions options = new IosInAppWebViewOptions();
|
||||
options.disallowOverScroll = map["disallowOverScroll"];
|
||||
options.enableViewportScale = map["enableViewportScale"];
|
||||
options.suppressesIncrementalRendering = map["suppressesIncrementalRendering"];
|
||||
options.allowsAirPlayForMediaPlayback = map["allowsAirPlayForMediaPlayback"];
|
||||
options.allowsBackForwardNavigationGestures = map["allowsBackForwardNavigationGestures"];
|
||||
options.allowsLinkPreview = map["allowsLinkPreview"];
|
||||
options.ignoresViewportScaleLimits = map["ignoresViewportScaleLimits"];
|
||||
options.allowsInlineMediaPlayback = map["allowsInlineMediaPlayback"];
|
||||
options.allowsPictureInPictureMediaPlayback = map["allowsPictureInPictureMediaPlayback"];
|
||||
options.transparentBackground = map["transparentBackground"];
|
||||
options.applicationNameForUserAgent = map["applicationNameForUserAgent"];
|
||||
options.isFraudulentWebsiteWarningEnabled = map["isFraudulentWebsiteWarningEnabled"];
|
||||
options.selectionGranularity = IosInAppWebViewSelectionGranularity.fromValue(map["selectionGranularity"]);
|
||||
options.dataDetectorTypes = dataDetectorTypes;
|
||||
return options;
|
||||
}
|
||||
}
|
||||
|
||||
class InAppBrowserOptions implements BrowserOptions, AndroidOptions, iOSOptions {
|
||||
class InAppBrowserOptions implements BrowserOptions, AndroidOptions, IosOptions {
|
||||
bool hidden;
|
||||
bool toolbarTop;
|
||||
String toolbarTopBackgroundColor;
|
||||
@ -231,9 +350,20 @@ class InAppBrowserOptions implements BrowserOptions, AndroidOptions, iOSOptions
|
||||
"toolbarTop": toolbarTop,
|
||||
"toolbarTopBackgroundColor": toolbarTopBackgroundColor,
|
||||
"toolbarTopFixedTitle": toolbarTopFixedTitle,
|
||||
"hideUrlBar": hideUrlBar,
|
||||
"hideUrlBar": hideUrlBar
|
||||
};
|
||||
}
|
||||
|
||||
@override
|
||||
static InAppBrowserOptions fromMap(Map<String, dynamic> map) {
|
||||
InAppBrowserOptions options = new InAppBrowserOptions();
|
||||
options.hidden = map["hidden"];
|
||||
options.toolbarTop = map["toolbarTop"];
|
||||
options.toolbarTopBackgroundColor = map["toolbarTopBackgroundColor"];
|
||||
options.toolbarTopFixedTitle = map["toolbarTopFixedTitle"];
|
||||
options.hideUrlBar = map["hideUrlBar"];
|
||||
return options;
|
||||
}
|
||||
}
|
||||
|
||||
class AndroidInAppBrowserOptions implements BrowserOptions, AndroidOptions {
|
||||
@ -251,21 +381,30 @@ class AndroidInAppBrowserOptions implements BrowserOptions, AndroidOptions {
|
||||
"progressBar": progressBar,
|
||||
};
|
||||
}
|
||||
|
||||
@override
|
||||
static AndroidInAppBrowserOptions fromMap(Map<String, dynamic> map) {
|
||||
AndroidInAppBrowserOptions options = new AndroidInAppBrowserOptions();
|
||||
options.hideTitleBar = map["hideTitleBar"];
|
||||
options.closeOnCannotGoBack = map["closeOnCannotGoBack"];
|
||||
options.progressBar = map["progressBar"];
|
||||
return options;
|
||||
}
|
||||
}
|
||||
|
||||
class iOSInAppBrowserOptions implements BrowserOptions, iOSOptions {
|
||||
class IosInAppBrowserOptions implements BrowserOptions, IosOptions {
|
||||
bool toolbarBottom;
|
||||
String toolbarBottomBackgroundColor;
|
||||
bool toolbarBottomTranslucent;
|
||||
String closeButtonCaption;
|
||||
String closeButtonColor;
|
||||
iOSWebViewOptionsPresentationStyle presentationStyle;
|
||||
iOSWebViewOptionsTransitionStyle transitionStyle;
|
||||
IosWebViewOptionsPresentationStyle presentationStyle;
|
||||
IosWebViewOptionsTransitionStyle transitionStyle;
|
||||
bool spinner;
|
||||
|
||||
iOSInAppBrowserOptions({this.toolbarBottom = true, this.toolbarBottomBackgroundColor = "", this.toolbarBottomTranslucent = true, this.closeButtonCaption = "",
|
||||
this.closeButtonColor = "", this.presentationStyle = iOSWebViewOptionsPresentationStyle.FULL_SCREEN,
|
||||
this.transitionStyle = iOSWebViewOptionsTransitionStyle.COVER_VERTICAL, this.spinner = true});
|
||||
IosInAppBrowserOptions({this.toolbarBottom = true, this.toolbarBottomBackgroundColor = "", this.toolbarBottomTranslucent = true, this.closeButtonCaption = "",
|
||||
this.closeButtonColor = "", this.presentationStyle = IosWebViewOptionsPresentationStyle.FULL_SCREEN,
|
||||
this.transitionStyle = IosWebViewOptionsTransitionStyle.COVER_VERTICAL, this.spinner = true});
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toMap() {
|
||||
@ -277,14 +416,22 @@ class iOSInAppBrowserOptions implements BrowserOptions, iOSOptions {
|
||||
"closeButtonColor": closeButtonColor,
|
||||
"presentationStyle": presentationStyle.toValue(),
|
||||
"transitionStyle": transitionStyle.toValue(),
|
||||
"spinner": spinner,
|
||||
"spinner": spinner
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
class ChromeSafariBrowserOptions {
|
||||
Map<String, dynamic> toMap() {
|
||||
return {};
|
||||
@override
|
||||
static IosInAppBrowserOptions fromMap(Map<String, dynamic> map) {
|
||||
IosInAppBrowserOptions options = new IosInAppBrowserOptions();
|
||||
options.toolbarBottom = map["toolbarBottom"];
|
||||
options.toolbarBottomBackgroundColor = map["toolbarBottomBackgroundColor"];
|
||||
options.toolbarBottomTranslucent = map["toolbarBottomTranslucent"];
|
||||
options.closeButtonCaption = map["closeButtonCaption"];
|
||||
options.closeButtonColor = map["closeButtonColor"];
|
||||
options.presentationStyle = IosWebViewOptionsPresentationStyle.fromValue(map["presentationStyle"]);
|
||||
options.transitionStyle = IosWebViewOptionsTransitionStyle.fromValue(map["transitionStyle"]);
|
||||
options.spinner = map["spinner"];
|
||||
return options;
|
||||
}
|
||||
}
|
||||
|
||||
@ -304,23 +451,34 @@ class AndroidChromeCustomTabsOptions implements ChromeSafariBrowserOptions, Andr
|
||||
"showTitle": showTitle,
|
||||
"toolbarBackgroundColor": toolbarBackgroundColor,
|
||||
"enableUrlBarHiding": enableUrlBarHiding,
|
||||
"instantAppsEnabled": instantAppsEnabled,
|
||||
"instantAppsEnabled": instantAppsEnabled
|
||||
};
|
||||
}
|
||||
|
||||
@override
|
||||
static AndroidChromeCustomTabsOptions fromMap(Map<String, dynamic> map) {
|
||||
AndroidChromeCustomTabsOptions options = new AndroidChromeCustomTabsOptions();
|
||||
options.addShareButton = map["addShareButton"];
|
||||
options.showTitle = map["showTitle"];
|
||||
options.toolbarBackgroundColor = map["toolbarBackgroundColor"];
|
||||
options.enableUrlBarHiding = map["enableUrlBarHiding"];
|
||||
options.instantAppsEnabled = map["instantAppsEnabled"];
|
||||
return options;
|
||||
}
|
||||
}
|
||||
|
||||
class iOSSafariOptions implements ChromeSafariBrowserOptions, iOSOptions {
|
||||
class IosSafariOptions implements ChromeSafariBrowserOptions, IosOptions {
|
||||
bool entersReaderIfAvailable;
|
||||
bool barCollapsingEnabled;
|
||||
iOSSafariOptionsDismissButtonStyle dismissButtonStyle;
|
||||
IosSafariOptionsDismissButtonStyle dismissButtonStyle;
|
||||
String preferredBarTintColor;
|
||||
String preferredControlTintColor;
|
||||
iOSWebViewOptionsPresentationStyle presentationStyle;
|
||||
iOSWebViewOptionsTransitionStyle transitionStyle;
|
||||
IosWebViewOptionsPresentationStyle presentationStyle;
|
||||
IosWebViewOptionsTransitionStyle transitionStyle;
|
||||
|
||||
iOSSafariOptions({this.entersReaderIfAvailable = false, this.barCollapsingEnabled = false, this.dismissButtonStyle = iOSSafariOptionsDismissButtonStyle.DONE,
|
||||
this.preferredBarTintColor = "", this.preferredControlTintColor = "", this.presentationStyle = iOSWebViewOptionsPresentationStyle.FULL_SCREEN,
|
||||
this.transitionStyle = iOSWebViewOptionsTransitionStyle.COVER_VERTICAL});
|
||||
IosSafariOptions({this.entersReaderIfAvailable = false, this.barCollapsingEnabled = false, this.dismissButtonStyle = IosSafariOptionsDismissButtonStyle.DONE,
|
||||
this.preferredBarTintColor = "", this.preferredControlTintColor = "", this.presentationStyle = IosWebViewOptionsPresentationStyle.FULL_SCREEN,
|
||||
this.transitionStyle = IosWebViewOptionsTransitionStyle.COVER_VERTICAL});
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toMap() {
|
||||
@ -331,7 +489,20 @@ class iOSSafariOptions implements ChromeSafariBrowserOptions, iOSOptions {
|
||||
"preferredBarTintColor": preferredBarTintColor,
|
||||
"preferredControlTintColor": preferredControlTintColor,
|
||||
"presentationStyle": presentationStyle.toValue(),
|
||||
"transitionStyle": transitionStyle.toValue(),
|
||||
"transitionStyle": transitionStyle.toValue()
|
||||
};
|
||||
}
|
||||
|
||||
@override
|
||||
static IosSafariOptions fromMap(Map<String, dynamic> map) {
|
||||
IosSafariOptions options = new IosSafariOptions();
|
||||
options.entersReaderIfAvailable = map["entersReaderIfAvailable"];
|
||||
options.barCollapsingEnabled = map["barCollapsingEnabled"];
|
||||
options.dismissButtonStyle = IosSafariOptionsDismissButtonStyle.fromValue(map["dismissButtonStyle"]);
|
||||
options.preferredBarTintColor = map["preferredBarTintColor"];
|
||||
options.preferredControlTintColor = map["preferredControlTintColor"];
|
||||
options.presentationStyle = IosWebViewOptionsPresentationStyle.fromValue(map["presentationStyle"]);
|
||||
options.transitionStyle = IosWebViewOptionsTransitionStyle.fromValue(map["transitionStyle"]);
|
||||
return options;
|
||||
}
|
||||
}
|
59
lib/t_rex_runner/t-rex.css
Normal file
59
lib/t_rex_runner/t-rex.css
Normal file
@ -0,0 +1,59 @@
|
||||
#main-frame-error {
|
||||
box-sizing: border-box;
|
||||
padding: 0 10%;
|
||||
font-size: 1em;
|
||||
line-height: 1.55;
|
||||
margin: 0 auto;
|
||||
max-width: 600px;
|
||||
padding-top: 100px;
|
||||
width: 100%;
|
||||
}
|
||||
#main-content {
|
||||
font-size: 1em;
|
||||
line-height: 1.55;
|
||||
margin: 0 auto;
|
||||
max-width: 600px;
|
||||
padding-top: 100px;
|
||||
width: 100%;
|
||||
}
|
||||
#t-rex-icon {
|
||||
font-size: 1em;
|
||||
line-height: 1.55;
|
||||
background-repeat: no-repeat;
|
||||
background-size: 100%;
|
||||
height: 72px;
|
||||
margin: 0 0 40px;
|
||||
width: 72px;
|
||||
display: inline-block;
|
||||
content: -webkit-image-set(
|
||||
url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABIAQMAAABvIyEEAAAABlBMVEUAAABTU1OoaSf/AAAAAXRSTlMAQObYZgAAAGxJREFUeF7tyMEJwkAQRuFf5ipMKxYQiJ3Z2nSwrWwBA0+DQZcdxEOueaePp9+dQZFB7GpUcURSVU66yVNFj6LFICatThZB6r/ko/pbRpUgilY0Cbw5sNmb9txGXUKyuH7eV25x39DtJXUNPQGJtWFV+BT/QAAAAABJRU5ErkJggg==)
|
||||
1x,
|
||||
url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJAAAACQBAMAAAAVaP+LAAAAGFBMVEUAAABTU1NNTU1TU1NPT09SUlJSUlJTU1O8B7DEAAAAB3RSTlMAoArVKvVgBuEdKgAAAJ1JREFUeF7t1TEOwyAMQNG0Q6/UE+RMXD9d/tC6womIFSL9P+MnAYOXeTIzMzMzMzMzaz8J9Ri6HoITmuHXhISE8nEh9yxDh55aCEUoTGbbQwjqHwIkRAEiIaG0+0AA9VBMaE89Rogeoww936MQrWdBr4GN/z0IAdQ6nQ/FIpRXDwHcA+JIJcQowQAlFUA0MfQpXLlVQfkzR4igS6ENjknm/wiaGhsAAAAASUVORK5CYII=)
|
||||
2x
|
||||
);
|
||||
position: relative;
|
||||
visibility: hidden;
|
||||
}
|
||||
#offline-resources {
|
||||
display: none;
|
||||
}
|
||||
#main-frame-error > .runner-container {
|
||||
height: 150px;
|
||||
max-width: 600px;
|
||||
overflow: hidden;
|
||||
position: absolute;
|
||||
top: 35px;
|
||||
width: 44px;
|
||||
}
|
||||
#main-frame-error > .controller {
|
||||
background: rgba(247, 247, 247, 0.1);
|
||||
height: 100vh;
|
||||
left: 0;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
width: 100vw;
|
||||
z-index: 9;
|
||||
}
|
||||
#main-frame-error .hidden {
|
||||
display: none;
|
||||
}
|
16
lib/t_rex_runner/t-rex.html
Executable file
16
lib/t_rex_runner/t-rex.html
Executable file
File diff suppressed because one or more lines are too long
@ -3,6 +3,7 @@
|
||||
const express = require('express')
|
||||
var https = require('https')
|
||||
const auth = require('basic-auth')
|
||||
const app = express()
|
||||
const appHttps = express()
|
||||
const appAuthBasic = express()
|
||||
const fs = require('fs')
|
||||
@ -78,6 +79,40 @@ appAuthBasic.get("/", (req, res) => {
|
||||
</body>
|
||||
</html>
|
||||
`);
|
||||
res.end()
|
||||
})
|
||||
|
||||
appAuthBasic.listen(8081)
|
||||
appAuthBasic.listen(8081)
|
||||
|
||||
// Parse URL-encoded bodies (as sent by HTML forms)
|
||||
app.use(express.urlencoded());
|
||||
|
||||
// Parse JSON bodies (as sent by API clients)
|
||||
app.use(express.json());
|
||||
|
||||
app.get("/", (req, res) => {
|
||||
res.send(`
|
||||
<html>
|
||||
<head>
|
||||
</head>
|
||||
<body>
|
||||
<p>HELLO</p>
|
||||
</body>
|
||||
</html>
|
||||
`);
|
||||
res.end()
|
||||
})
|
||||
|
||||
app.post("/test-post", (req, res) => {
|
||||
res.send(`
|
||||
<html>
|
||||
<head>
|
||||
</head>
|
||||
<body>
|
||||
<p>HELLO ${req.body.name}!</p>
|
||||
</body>
|
||||
</html>
|
||||
`);
|
||||
res.end()
|
||||
})
|
||||
app.listen(8082)
|
@ -24,6 +24,9 @@ flutter:
|
||||
androidPackage: com.pichillilorenzo.flutter_inappbrowser
|
||||
pluginClass: InAppBrowserFlutterPlugin
|
||||
|
||||
assets:
|
||||
- packages/flutter_inappbrowser/t_rex_runner/t-rex.html
|
||||
- packages/flutter_inappbrowser/t_rex_runner/t-rex.css
|
||||
# To add assets to your plugin package, add an assets section, like this:
|
||||
# assets:
|
||||
# - images/a_dot_burr.jpeg
|
||||
|
Loading…
x
Reference in New Issue
Block a user