updated code docs
This commit is contained in:
parent
6c5e314795
commit
a59dee7c5d
|
@ -15,13 +15,8 @@
|
|||
</component>
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="9b41f7a2-a71e-4923-91fb-249d7815b3e7" name="Default" comment="">
|
||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/CHANGELOG.md" beforeDir="false" afterPath="$PROJECT_DIR$/CHANGELOG.md" 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$/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_webview.dart" beforeDir="false" afterPath="$PROJECT_DIR$/lib/src/in_app_webview.dart" 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$/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" />
|
||||
</list>
|
||||
<ignored path="$PROJECT_DIR$/.dart_tool/" />
|
||||
|
@ -45,8 +40,8 @@
|
|||
<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="593">
|
||||
<caret line="45" column="536" lean-forward="true" selection-start-line="45" selection-start-column="28" selection-end-line="45" selection-end-column="536" />
|
||||
<state relative-caret-position="354">
|
||||
<caret line="146" column="124" selection-start-line="146" selection-start-column="114" selection-end-line="146" selection-end-column="124" />
|
||||
<folding>
|
||||
<element signature="e#0#17#0" expanded="true" />
|
||||
</folding>
|
||||
|
@ -55,34 +50,10 @@
|
|||
</entry>
|
||||
</file>
|
||||
<file pinned="false" current-in-tab="true">
|
||||
<entry file="file://$PROJECT_DIR$/lib/src/webview_options.dart">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="418">
|
||||
<caret line="295" column="33" lean-forward="true" selection-start-line="295" selection-start-column="33" selection-end-line="295" selection-end-column="33" />
|
||||
<folding>
|
||||
<element signature="e#0#17#0" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/lib/src/in_app_browser.dart">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="393">
|
||||
<caret line="67" column="212" lean-forward="true" selection-start-line="67" selection-start-column="38" selection-end-line="67" selection-end-column="212" />
|
||||
<folding>
|
||||
<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$/lib/src/types.dart">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="227">
|
||||
<caret line="598" column="42" selection-start-line="598" selection-start-column="6" selection-end-line="598" selection-end-column="42" />
|
||||
<state relative-caret-position="259">
|
||||
<caret line="325" column="84" lean-forward="true" selection-start-line="325" selection-start-column="84" selection-end-line="325" selection-end-column="84" />
|
||||
<folding>
|
||||
<element signature="e#0#20#0" expanded="true" />
|
||||
</folding>
|
||||
|
@ -90,28 +61,10 @@
|
|||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/example/assets/index.html">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="1005">
|
||||
<caret line="67" column="37" selection-start-line="67" selection-start-column="37" selection-end-line="67" selection-end-column="37" />
|
||||
</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="1905">
|
||||
<caret line="127" column="25" selection-start-line="127" selection-start-column="10" selection-end-line="127" selection-end-column="25" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/example/lib/inline_example.screen.dart">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="4275">
|
||||
<state relative-caret-position="207">
|
||||
<caret line="295" column="18" selection-start-line="295" selection-start-column="18" selection-end-line="295" selection-end-column="18" />
|
||||
<folding>
|
||||
<element signature="e#0#20#0" expanded="true" />
|
||||
|
@ -123,7 +76,7 @@
|
|||
<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="248">
|
||||
<state relative-caret-position="315">
|
||||
<caret line="21" column="54" lean-forward="true" selection-start-line="21" selection-start-column="54" selection-end-line="21" selection-end-column="54" />
|
||||
</state>
|
||||
</provider>
|
||||
|
@ -141,11 +94,6 @@
|
|||
</component>
|
||||
<component name="FindInProjectRecents">
|
||||
<findStrings>
|
||||
<find>onAjaxEvent</find>
|
||||
<find>shouldInterceptAjaxRequest</find>
|
||||
<find>onAjaxProgress</find>
|
||||
<find>onAjaxReady</find>
|
||||
<find>NAVIGATION</find>
|
||||
<find>onNavigationStateChange</find>
|
||||
<find>shouldInterceptFetchRequest</find>
|
||||
<find>scheme</find>
|
||||
|
@ -165,12 +113,17 @@
|
|||
<find>XMLHttpRequest</find>
|
||||
<find>nDownloadStart</find>
|
||||
<find>ServerTrustAuthResponse</find>
|
||||
<find>onDow</find>
|
||||
<find>InAppWebViewUserPreferredContentMode</find>
|
||||
<find>verticalScrollBarEnabled</find>
|
||||
<find>mixedContentMode</find>
|
||||
<find>eWideViewPort</find>
|
||||
<find>initialScale</find>
|
||||
<find>mediaPlaybackRequiresUserGesture</find>
|
||||
<find>onDow</find>
|
||||
<find>toolbarTopFixedTitle</find>
|
||||
<find>resourceCustomSchemes</find>
|
||||
<find>JsAlertResponse</find>
|
||||
<find>InAppWebViewUserPreferredContentMode</find>
|
||||
<find>JsConfirmResponse</find>
|
||||
</findStrings>
|
||||
<replaceStrings>
|
||||
<replace>activity.getPreferences(0)</replace>
|
||||
|
@ -240,13 +193,13 @@
|
|||
<option value="$PROJECT_DIR$/example/pubspec.yaml" />
|
||||
<option value="$PROJECT_DIR$/ios/flutter_inappbrowser.podspec" />
|
||||
<option value="$PROJECT_DIR$/nodejs_server_test_auth_basic_and_ssl/index.js" />
|
||||
<option value="$PROJECT_DIR$/lib/src/types.dart" />
|
||||
<option value="$PROJECT_DIR$/example/assets/index.html" />
|
||||
<option value="$PROJECT_DIR$/example/lib/inline_example.screen.dart" />
|
||||
<option value="$PROJECT_DIR$/CHANGELOG.md" />
|
||||
<option value="$PROJECT_DIR$/lib/src/in_app_browser.dart" />
|
||||
<option value="$PROJECT_DIR$/lib/src/in_app_webview.dart" />
|
||||
<option value="$PROJECT_DIR$/lib/src/webview_options.dart" />
|
||||
<option value="$PROJECT_DIR$/lib/src/types.dart" />
|
||||
</list>
|
||||
</option>
|
||||
</component>
|
||||
|
@ -492,7 +445,7 @@
|
|||
<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.6529745" visible="true" weight="0.15867944" />
|
||||
<window_info active="true" 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" />
|
||||
|
@ -511,7 +464,7 @@
|
|||
<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 active="true" anchor="bottom" id="Terminal" order="10" sideWeight="0.49533224" visible="true" weight="0.22487047" />
|
||||
<window_info anchor="bottom" id="Terminal" order="10" sideWeight="0.49533224" visible="true" weight="0.34196892" />
|
||||
<window_info anchor="bottom" id="Messages" order="11" weight="0.3253886" />
|
||||
<window_info anchor="bottom" id="Dependency Viewer" order="12" weight="0.32800853" />
|
||||
<window_info anchor="bottom" id="Logcat" order="13" weight="0.32953367" />
|
||||
|
@ -702,16 +655,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="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$/example/build/app/outputs/apk/debug/output.json">
|
||||
<provider selected="true" editor-type-id="text-editor" />
|
||||
</entry>
|
||||
|
@ -744,49 +687,59 @@
|
|||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/example/assets/index.html">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="1005">
|
||||
<state relative-caret-position="558">
|
||||
<caret line="67" column="37" selection-start-line="67" selection-start-column="37" selection-end-line="67" selection-end-column="37" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<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="1905">
|
||||
<state relative-caret-position="580">
|
||||
<caret line="127" column="25" selection-start-line="127" selection-start-column="10" selection-end-line="127" selection-end-column="25" />
|
||||
</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="4275">
|
||||
<caret line="295" column="18" selection-start-line="295" selection-start-column="18" selection-end-line="295" selection-end-column="18" />
|
||||
<folding>
|
||||
<element signature="e#0#20#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="248">
|
||||
<state relative-caret-position="315">
|
||||
<caret line="21" column="54" lean-forward="true" selection-start-line="21" selection-start-column="54" selection-end-line="21" selection-end-column="54" />
|
||||
</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="393">
|
||||
<caret line="67" column="212" lean-forward="true" selection-start-line="67" selection-start-column="38" selection-end-line="67" selection-end-column="212" />
|
||||
<state relative-caret-position="506">
|
||||
<caret line="104" column="123" lean-forward="true" selection-start-line="104" selection-start-column="24" selection-end-line="104" selection-end-column="123" />
|
||||
<folding>
|
||||
<element signature="e#0#20#0" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/lib/src/types.dart">
|
||||
<entry file="file://$PROJECT_DIR$/lib/src/chrome_safari_browser.dart">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="227">
|
||||
<caret line="598" column="42" selection-start-line="598" selection-start-column="6" selection-end-line="598" selection-end-column="42" />
|
||||
<state relative-caret-position="507">
|
||||
<caret line="71" column="133" selection-start-line="71" selection-start-column="28" selection-end-line="71" selection-end-column="133" />
|
||||
<folding>
|
||||
<element signature="e#0#20#0" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/lib/src/webview_options.dart">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="321">
|
||||
<caret line="685" column="139" selection-start-line="685" selection-start-column="139" selection-end-line="685" selection-end-column="139" />
|
||||
<folding>
|
||||
<element signature="e#0#17#0" expanded="true" />
|
||||
</folding>
|
||||
</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="207">
|
||||
<caret line="295" column="18" selection-start-line="295" selection-start-column="18" selection-end-line="295" selection-end-column="18" />
|
||||
<folding>
|
||||
<element signature="e#0#20#0" expanded="true" />
|
||||
</folding>
|
||||
|
@ -795,20 +748,20 @@
|
|||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/lib/src/in_app_webview.dart">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="593">
|
||||
<caret line="45" column="536" lean-forward="true" selection-start-line="45" selection-start-column="28" selection-end-line="45" selection-end-column="536" />
|
||||
<state relative-caret-position="354">
|
||||
<caret line="146" column="124" selection-start-line="146" selection-start-column="114" selection-end-line="146" selection-end-column="124" />
|
||||
<folding>
|
||||
<element signature="e#0#17#0" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/lib/src/webview_options.dart">
|
||||
<entry file="file://$PROJECT_DIR$/lib/src/types.dart">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="418">
|
||||
<caret line="295" column="33" lean-forward="true" selection-start-line="295" selection-start-column="33" selection-end-line="295" selection-end-column="33" />
|
||||
<state relative-caret-position="259">
|
||||
<caret line="325" column="84" lean-forward="true" selection-start-line="325" selection-start-column="84" selection-end-line="325" selection-end-column="84" />
|
||||
<folding>
|
||||
<element signature="e#0#17#0" expanded="true" />
|
||||
<element signature="e#0#20#0" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
|
|
|
@ -117,10 +117,10 @@ public class InAppBrowserActivity extends AppCompatActivity {
|
|||
if (!options.toolbarTop)
|
||||
actionBar.hide();
|
||||
|
||||
if (!options.toolbarTopBackgroundColor.isEmpty())
|
||||
if (options.toolbarTopBackgroundColor != null && !options.toolbarTopBackgroundColor.isEmpty())
|
||||
actionBar.setBackgroundDrawable(new ColorDrawable(Color.parseColor(options.toolbarTopBackgroundColor)));
|
||||
|
||||
if (!options.toolbarTopFixedTitle.isEmpty())
|
||||
if (options.toolbarTopFixedTitle != null && !options.toolbarTopFixedTitle.isEmpty())
|
||||
actionBar.setTitle(options.toolbarTopFixedTitle);
|
||||
|
||||
}
|
||||
|
|
|
@ -134,7 +134,7 @@ class CustomSchemeResponse {
|
|||
///Public class representing a JavaScript console message from WebCore.
|
||||
///This could be a issued by a call to one of the console logging functions (e.g. console.log('...')) or a JavaScript error on the page.
|
||||
///
|
||||
///To receive notifications of these messages, override the [InAppBrowser.onConsoleMessage()] function.
|
||||
///To receive notifications of these messages, use the [onConsoleMessage] event.
|
||||
class ConsoleMessage {
|
||||
|
||||
String sourceURL = "";
|
||||
|
@ -198,7 +198,7 @@ class GeolocationPermissionShowPromptResponse {
|
|||
}
|
||||
}
|
||||
|
||||
///
|
||||
///JsAlertResponseAction class used by [JsAlertResponse] class.
|
||||
class JsAlertResponseAction {
|
||||
final int _value;
|
||||
const JsAlertResponseAction._internal(this._value);
|
||||
|
@ -207,11 +207,15 @@ class JsAlertResponseAction {
|
|||
static const CONFIRM = const JsAlertResponseAction._internal(0);
|
||||
}
|
||||
|
||||
///
|
||||
///JsAlertResponse class represents the response used by the [onJsAlert] event to control a JavaScript alert dialog.
|
||||
class JsAlertResponse {
|
||||
///Message to be displayed in the window.
|
||||
String message;
|
||||
///Title of the confirm button.
|
||||
String confirmButtonTitle;
|
||||
///Whether the client will handle the alert dialog.
|
||||
bool handledByClient;
|
||||
///Action used to confirm that the user hit confirm button.
|
||||
JsAlertResponseAction action;
|
||||
|
||||
JsAlertResponse({this.message = "", this.handledByClient = false, this.confirmButtonTitle = "", this.action = JsAlertResponseAction.CONFIRM});
|
||||
|
@ -226,7 +230,7 @@ class JsAlertResponse {
|
|||
}
|
||||
}
|
||||
|
||||
///
|
||||
///JsConfirmResponseAction class used by [JsConfirmResponse] class.
|
||||
class JsConfirmResponseAction {
|
||||
final int _value;
|
||||
const JsConfirmResponseAction._internal(this._value);
|
||||
|
@ -236,12 +240,17 @@ class JsConfirmResponseAction {
|
|||
static const CANCEL = const JsConfirmResponseAction._internal(1);
|
||||
}
|
||||
|
||||
///
|
||||
///JsConfirmResponse class represents the response used by the [onJsConfirm] event to control a JavaScript confirm dialog.
|
||||
class JsConfirmResponse {
|
||||
///Message to be displayed in the window.
|
||||
String message;
|
||||
///Title of the confirm button.
|
||||
String confirmButtonTitle;
|
||||
///Title of the cancel button.
|
||||
String cancelButtonTitle;
|
||||
///Whether the client will handle the confirm dialog.
|
||||
bool handledByClient;
|
||||
///Action used to confirm that the user hit confirm or cancel button.
|
||||
JsConfirmResponseAction action;
|
||||
|
||||
JsConfirmResponse({this.message = "", this.handledByClient = false, this.confirmButtonTitle = "", this.cancelButtonTitle = "", this.action = JsConfirmResponseAction.CANCEL});
|
||||
|
@ -257,7 +266,7 @@ class JsConfirmResponse {
|
|||
}
|
||||
}
|
||||
|
||||
///
|
||||
///JsPromptResponseAction class used by [JsPromptResponse] class.
|
||||
class JsPromptResponseAction {
|
||||
final int _value;
|
||||
const JsPromptResponseAction._internal(this._value);
|
||||
|
@ -267,14 +276,21 @@ class JsPromptResponseAction {
|
|||
static const CANCEL = const JsPromptResponseAction._internal(1);
|
||||
}
|
||||
|
||||
///
|
||||
///JsPromptResponse class represents the response used by the [onJsPrompt] event to control a JavaScript prompt dialog.
|
||||
class JsPromptResponse {
|
||||
///Message to be displayed in the window.
|
||||
String message;
|
||||
///The default value displayed in the prompt dialog.
|
||||
String defaultValue;
|
||||
///Title of the confirm button.
|
||||
String confirmButtonTitle;
|
||||
///Title of the cancel button.
|
||||
String cancelButtonTitle;
|
||||
///Whether the client will handle the prompt dialog.
|
||||
bool handledByClient;
|
||||
///Value of the prompt dialog.
|
||||
String value;
|
||||
///Action used to confirm that the user hit confirm or cancel button.
|
||||
JsPromptResponseAction action;
|
||||
|
||||
JsPromptResponse({this.message = "", this.defaultValue = "", this.handledByClient = false, this.confirmButtonTitle = "", this.cancelButtonTitle = "", this.value, this.action = JsPromptResponseAction.CANCEL});
|
||||
|
@ -310,7 +326,7 @@ class SafeBrowsingThreat {
|
|||
static const SAFE_BROWSING_THREAT_BILLING = const SafeBrowsingThreat._internal(4);
|
||||
}
|
||||
|
||||
///
|
||||
///SafeBrowsingResponseAction class used by [SafeBrowsingResponse] class.
|
||||
class SafeBrowsingResponseAction {
|
||||
final int _value;
|
||||
const SafeBrowsingResponseAction._internal(this._value);
|
||||
|
|
|
@ -66,6 +66,8 @@ class InAppWebViewOptions implements WebViewOptions, BrowserOptions, AndroidOpti
|
|||
///Set to `true` to allow JavaScript open windows without user interaction. The default value is `false`.
|
||||
bool javaScriptCanOpenWindowsAutomatically;
|
||||
///Set to `true` to prevent HTML5 audio or video from autoplaying. The default value is `true`.
|
||||
///
|
||||
///**NOTE**: available on iOS 10.0+.
|
||||
bool mediaPlaybackRequiresUserGesture;
|
||||
///Sets the minimum font size. The default value is `8` for Android, `0` for iOS.
|
||||
int minimumFontSize;
|
||||
|
@ -74,8 +76,12 @@ class InAppWebViewOptions implements WebViewOptions, BrowserOptions, AndroidOpti
|
|||
///Define whether the horizontal scrollbar should be drawn or not. The default value is `true`.
|
||||
bool horizontalScrollBarEnabled;
|
||||
///List of custom schemes that the WebView must handle. Use the [onLoadResourceCustomScheme] event to intercept resource requests with custom scheme.
|
||||
///
|
||||
///**NOTE**: available on iOS 11.0+.
|
||||
List<String> resourceCustomSchemes;
|
||||
///List of [ContentBlocker] that are a set of rules used to block content in the browser window.
|
||||
///
|
||||
///**NOTE**: available on iOS 11.0+.
|
||||
List<ContentBlocker> contentBlockers;
|
||||
///Sets the content mode that the WebView needs to use. The default value is [InAppWebViewUserPreferredContentMode.RECOMMENDED].
|
||||
///
|
||||
|
@ -176,6 +182,7 @@ class InAppWebViewOptions implements WebViewOptions, BrowserOptions, AndroidOpti
|
|||
}
|
||||
}
|
||||
|
||||
///This class represents all the Android-only WebView options available.
|
||||
class AndroidInAppWebViewOptions implements WebViewOptions, BrowserOptions, AndroidOptions {
|
||||
///Sets the text zoom of the page in percent. The default is `100`.
|
||||
int textZoom;
|
||||
|
@ -400,19 +407,51 @@ class AndroidInAppWebViewOptions implements WebViewOptions, BrowserOptions, Andr
|
|||
}
|
||||
}
|
||||
|
||||
///This class represents all the iOS-only WebView options available.
|
||||
class IosInAppWebViewOptions implements WebViewOptions, BrowserOptions, IosOptions {
|
||||
///Set to `true` to disable the bouncing of the WebView when the scrolling has reached an edge of the content. The default value is `false`.
|
||||
bool disallowOverScroll;
|
||||
///Set to `true` to allow a viewport meta tag to either disable or restrict the range of user scaling. The default value is `false`.
|
||||
bool enableViewportScale;
|
||||
///Set to `true` if you want the WebView suppresses content rendering until it is fully loaded into memory. The default value is `false`.
|
||||
bool suppressesIncrementalRendering;
|
||||
///Set to `true` to allow AirPlay. The default value is `true`.
|
||||
bool allowsAirPlayForMediaPlayback;
|
||||
///Set to `true` to allow the horizontal swipe gestures trigger back-forward list navigations. The default value is `true`.
|
||||
bool allowsBackForwardNavigationGestures;
|
||||
///Set to `true` to allow that pressing on a link displays a preview of the destination for the link. The default value is `true`.
|
||||
///
|
||||
///**NOTE**: available on iOS 9.0+.
|
||||
bool allowsLinkPreview;
|
||||
///Set to `true` if you want that the WebView should always allow scaling of the webpage, regardless of the author's intent.
|
||||
///The ignoresViewportScaleLimits property overrides the `user-scalable` HTML property in a webpage. The default value is `false`.
|
||||
bool ignoresViewportScaleLimits;
|
||||
///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`.
|
||||
bool allowsInlineMediaPlayback;
|
||||
///Set to `true` to allow HTML5 videos play picture-in-picture. The default value is `true`.
|
||||
///
|
||||
///**NOTE**: available on iOS 9.0+.
|
||||
bool allowsPictureInPictureMediaPlayback;
|
||||
///A Boolean value indicating whether warnings should be shown for suspected fraudulent content such as phishing or malware.
|
||||
///According to the official documentation, this feature is currently available in the following region: China.
|
||||
///The default value is `true`.
|
||||
///
|
||||
///**NOTE**: available on iOS 13.0+.
|
||||
bool isFraudulentWebsiteWarningEnabled;
|
||||
///The level of granularity with which the user can interactively select content in the web view.
|
||||
///The default value is [IosInAppWebViewSelectionGranularity.DYNAMIC]
|
||||
IosInAppWebViewSelectionGranularity selectionGranularity;
|
||||
///Specifying a dataDetectoryTypes value adds interactivity to web content that matches the value.
|
||||
///For example, Safari adds a link to “apple.com” in the text “Visit apple.com” if the dataDetectorTypes property is set to [IosInAppWebViewDataDetectorTypes.LINK].
|
||||
///The default value is [IosInAppWebViewDataDetectorTypes.NONE].
|
||||
///
|
||||
///**NOTE**: available on iOS 10.0+.
|
||||
List<IosInAppWebViewDataDetectorTypes> dataDetectorTypes;
|
||||
///Set `true` if shared cookies from `HTTPCookieStorage.shared` should used for every load request in the WebView.
|
||||
///The default value is `false`.
|
||||
///
|
||||
///**NOTE**: available on iOS 11.0+.
|
||||
bool sharedCookiesEnabled;
|
||||
|
||||
IosInAppWebViewOptions({this.disallowOverScroll = false, this.enableViewportScale = false, this.suppressesIncrementalRendering = false, this.allowsAirPlayForMediaPlayback = true,
|
||||
|
@ -471,14 +510,19 @@ class IosInAppWebViewOptions implements WebViewOptions, BrowserOptions, IosOptio
|
|||
}
|
||||
}
|
||||
|
||||
///This class represents all the cross-platform [InAppBrowser] options available.
|
||||
class InAppBrowserOptions implements BrowserOptions, AndroidOptions, IosOptions {
|
||||
///Set to `true` to create the browser and load the page, but not show it. Omit or set to `false` to have the browser open and load normally.
|
||||
///The default value is `false`.
|
||||
bool hidden;
|
||||
///Set to `false` to hide the toolbar at the top of the WebView. The default value is `true`.
|
||||
bool toolbarTop;
|
||||
///Set the custom background color of the toolbar at the top.
|
||||
String toolbarTopBackgroundColor;
|
||||
String toolbarTopFixedTitle;
|
||||
///Set to `true` to hide the url bar on the toolbar at the top. The default value is `false`.
|
||||
bool hideUrlBar;
|
||||
|
||||
InAppBrowserOptions({this.hidden = false, this.toolbarTop = true, this.toolbarTopBackgroundColor = "", this.toolbarTopFixedTitle = "", this.hideUrlBar = false});
|
||||
InAppBrowserOptions({this.hidden = false, this.toolbarTop = true, this.toolbarTopBackgroundColor = "", this.hideUrlBar = false});
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toMap() {
|
||||
|
@ -486,7 +530,6 @@ class InAppBrowserOptions implements BrowserOptions, AndroidOptions, IosOptions
|
|||
"hidden": hidden,
|
||||
"toolbarTop": toolbarTop,
|
||||
"toolbarTopBackgroundColor": toolbarTopBackgroundColor,
|
||||
"toolbarTopFixedTitle": toolbarTopFixedTitle,
|
||||
"hideUrlBar": hideUrlBar
|
||||
};
|
||||
}
|
||||
|
@ -497,23 +540,29 @@ class InAppBrowserOptions implements BrowserOptions, AndroidOptions, IosOptions
|
|||
options.hidden = map["hidden"];
|
||||
options.toolbarTop = map["toolbarTop"];
|
||||
options.toolbarTopBackgroundColor = map["toolbarTopBackgroundColor"];
|
||||
options.toolbarTopFixedTitle = map["toolbarTopFixedTitle"];
|
||||
options.hideUrlBar = map["hideUrlBar"];
|
||||
return options;
|
||||
}
|
||||
}
|
||||
|
||||
///This class represents all the Android-only [InAppBrowser] options available.
|
||||
class AndroidInAppBrowserOptions implements BrowserOptions, AndroidOptions {
|
||||
///Set to `true` if you want the title should be displayed. The default value is `false`.
|
||||
bool hideTitleBar;
|
||||
///Set the action bar's title.
|
||||
String toolbarTopFixedTitle;
|
||||
///Set to `false` to not close the InAppBrowser when the user click on the back button and the WebView cannot go back to the history. The default value is `true`.
|
||||
bool closeOnCannotGoBack;
|
||||
///Set to `false` to hide the progress bar at the bottom of the toolbar at the top. The default value is `true`.
|
||||
bool progressBar;
|
||||
|
||||
AndroidInAppBrowserOptions({this.hideTitleBar = true, this.closeOnCannotGoBack = true, this.progressBar = true});
|
||||
AndroidInAppBrowserOptions({this.hideTitleBar = true, this.toolbarTopFixedTitle = "", this.closeOnCannotGoBack = true, this.progressBar = true});
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toMap() {
|
||||
return {
|
||||
"hideTitleBar": hideTitleBar,
|
||||
"toolbarTopFixedTitle": toolbarTopFixedTitle,
|
||||
"closeOnCannotGoBack": closeOnCannotGoBack,
|
||||
"progressBar": progressBar,
|
||||
};
|
||||
|
@ -523,20 +572,30 @@ class AndroidInAppBrowserOptions implements BrowserOptions, AndroidOptions {
|
|||
static AndroidInAppBrowserOptions fromMap(Map<String, dynamic> map) {
|
||||
AndroidInAppBrowserOptions options = new AndroidInAppBrowserOptions();
|
||||
options.hideTitleBar = map["hideTitleBar"];
|
||||
options.toolbarTopFixedTitle = map["toolbarTopFixedTitle"];
|
||||
options.closeOnCannotGoBack = map["closeOnCannotGoBack"];
|
||||
options.progressBar = map["progressBar"];
|
||||
return options;
|
||||
}
|
||||
}
|
||||
|
||||
///This class represents all the iOS-only [InAppBrowser] options available.
|
||||
class IosInAppBrowserOptions implements BrowserOptions, IosOptions {
|
||||
///Set to `false` to hide the toolbar at the bottom of the WebView. The default value is `true`.
|
||||
bool toolbarBottom;
|
||||
///Set the custom background color of the toolbar at the bottom.
|
||||
String toolbarBottomBackgroundColor;
|
||||
///Set to `true` to set the toolbar at the bottom translucent. The default value is `true`.
|
||||
bool toolbarBottomTranslucent;
|
||||
///Set the custom text for the close button.
|
||||
String closeButtonCaption;
|
||||
///Set the custom color for the close button.
|
||||
String closeButtonColor;
|
||||
///Set the custom modal presentation style when presenting the WebView. The default value is [IosWebViewOptionsPresentationStyle.FULL_SCREEN].
|
||||
IosWebViewOptionsPresentationStyle presentationStyle;
|
||||
///Set to the custom transition style when presenting the WebView. The default value is [IosWebViewOptionsTransitionStyle.COVER_VERTICAL].
|
||||
IosWebViewOptionsTransitionStyle transitionStyle;
|
||||
///Set to `false` to hide the spinner when the WebView is loading a page. The default value is `true`.
|
||||
bool spinner;
|
||||
|
||||
IosInAppBrowserOptions({this.toolbarBottom = true, this.toolbarBottomBackgroundColor = "", this.toolbarBottomTranslucent = true, this.closeButtonCaption = "",
|
||||
|
@ -572,11 +631,17 @@ class IosInAppBrowserOptions implements BrowserOptions, IosOptions {
|
|||
}
|
||||
}
|
||||
|
||||
///This class represents all the Android-only [ChromeSafariBrowser] options available.
|
||||
class AndroidChromeCustomTabsOptions implements ChromeSafariBrowserOptions, AndroidOptions {
|
||||
///Set to `false` if you don't want the default share button. The default value is `true`.
|
||||
bool addShareButton;
|
||||
///Set to `false` if the title shouldn't be shown in the custom tab. The default value is `true`.
|
||||
bool showTitle;
|
||||
///Set the custom background color of the toolbar.
|
||||
String toolbarBackgroundColor;
|
||||
///Set to `true` to enable the url bar to hide as the user scrolls down on the page. The default value is `false`.
|
||||
bool enableUrlBarHiding;
|
||||
///Set to `true` to enable Instant Apps. The default value is `false`.
|
||||
bool instantAppsEnabled;
|
||||
|
||||
AndroidChromeCustomTabsOptions({this.addShareButton = true, this.showTitle = true, this.toolbarBackgroundColor = "", this.enableUrlBarHiding = false, this.instantAppsEnabled = false});
|
||||
|
@ -604,13 +669,21 @@ class AndroidChromeCustomTabsOptions implements ChromeSafariBrowserOptions, Andr
|
|||
}
|
||||
}
|
||||
|
||||
///This class represents all the iOS-only [ChromeSafariBrowser] options available.
|
||||
class IosSafariOptions implements ChromeSafariBrowserOptions, IosOptions {
|
||||
///Set to `true` if Reader mode should be entered automatically when it is available for the webpage. The default value is `false`.
|
||||
bool entersReaderIfAvailable;
|
||||
///Set to `true` to enable bar collapsing. The default value is `false`.
|
||||
bool barCollapsingEnabled;
|
||||
///Set the custom style for the dismiss button. The default value is [IosSafariOptionsDismissButtonStyle.DONE].
|
||||
IosSafariOptionsDismissButtonStyle dismissButtonStyle;
|
||||
///Set the custom background color of the navigation bar and the toolbar.
|
||||
String preferredBarTintColor;
|
||||
///Set the custom color of the control buttons on the navigation bar and the toolbar.
|
||||
String preferredControlTintColor;
|
||||
///Set the custom modal presentation style when presenting the WebView. The default value is [IosWebViewOptionsPresentationStyle.FULL_SCREEN].
|
||||
IosWebViewOptionsPresentationStyle presentationStyle;
|
||||
///Set to the custom transition style when presenting the WebView. The default value is [IosWebViewOptionsTransitionStyle.COVER_VERTICAL].
|
||||
IosWebViewOptionsTransitionStyle transitionStyle;
|
||||
|
||||
IosSafariOptions({this.entersReaderIfAvailable = false, this.barCollapsingEnabled = false, this.dismissButtonStyle = IosSafariOptionsDismissButtonStyle.DONE,
|
||||
|
|
Loading…
Reference in New Issue