diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 2e03245a7..d9e42d703 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -11,7 +11,13 @@
-
+
+
+
+
+
+
+
@@ -31,8 +37,8 @@
-
-
+
+
@@ -40,34 +46,76 @@
-
-
+
+
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
@@ -86,8 +134,6 @@
- (0)
- closeDihide()loadUrlshowWebPage
@@ -116,6 +162,8 @@
sourceFilehideUrlBarInAppBrowser
+ ###
+ presentationStyleactivity.getPreferences(0)
@@ -153,17 +201,17 @@
-
+
+
-
-
+
-
+
@@ -184,9 +232,6 @@
-
-
-
@@ -195,11 +240,24 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -389,20 +447,20 @@
-
+
+
-
-
+
-
+
@@ -414,13 +472,14 @@
-
+
+
@@ -430,32 +489,33 @@
-
-
-
-
+
+
+
+
+
-
+
-
+
-
-
-
-
-
+
+
+
+
+
-
+
@@ -463,7 +523,7 @@
-
+
@@ -606,13 +666,6 @@
-
-
-
-
-
-
-
@@ -725,16 +778,6 @@
-
-
-
-
-
-
-
-
-
-
@@ -749,50 +792,119 @@
-
+
-
-
-
-
-
+
+
-
+
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
-
+
+
-
+
-
-
-
+
+
+
+
+
-
+
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 954a188a8..1573dff66 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,6 +1,6 @@
## 0.2.0
-- added support of Chrome CustomTabs for android
+- added support of Chrome CustomTabs for Android
- added support of SFSafariViewController for iOS
- added the ability to create multiple instances of browsers
diff --git a/README.md b/README.md
index 070554208..83b8a9d0b 100644
--- a/README.md
+++ b/README.md
@@ -16,11 +16,17 @@ For help on editing plugin code, view the [documentation](https://flutter.io/dev
First, add `flutter_inappbrowser` as a [dependency in your pubspec.yaml file](https://flutter.io/using-packages/).
## Usage
+Classes:
+- [InAppBrowser](#inappbrowser): Native WebView.
+- [ChromeSafariBrowser](#chromesafaribrowser): [Chrome Custom Tabs](https://developer.android.com/reference/android/support/customtabs/package-summary) on Android / [SFSafariViewController](https://developer.apple.com/documentation/safariservices/sfsafariviewcontroller) on iOS.
+
+Screenshots [here](#screenshots).
+
+### `InAppBrowser` class
Create a Class that extends the `InAppBrowser` Class in order to override the callbacks to manage the browser events.
Example:
```dart
import 'package:flutter/material.dart';
-
import 'package:flutter_inappbrowser/flutter_inappbrowser.dart';
class MyInAppBrowser extends InAppBrowser {
@@ -107,7 +113,7 @@ class _MyAppState extends State {
}
```
-### Future\ InAppBrowser.open
+#### Future\ InAppBrowser.open
Opens a URL in a new InAppBrowser instance or the system browser.
@@ -188,7 +194,7 @@ inAppBrowser.open('https://flutter.io/', options: {
});
```
-### Events
+#### Events
Event fires when the `InAppBrowser` starts to load an `url`.
```dart
@@ -231,7 +237,7 @@ In order to be able to listen this event, you need to set `useShouldOverrideUrlL
}
```
-### Future\ InAppBrowser.loadUrl
+#### Future\ InAppBrowser.loadUrl
Loads the given `url` with optional `headers` specified as a map from name to value.
@@ -239,7 +245,7 @@ Loads the given `url` with optional `headers` specified as a map from name to va
inAppBrowser.loadUrl(String url, {Map headers = const {}});
```
-### Future\ InAppBrowser.show
+#### Future\ InAppBrowser.show
Displays an `InAppBrowser` window that was opened hidden. Calling this has no effect if the `InAppBrowser` was already visible.
@@ -247,7 +253,7 @@ Displays an `InAppBrowser` window that was opened hidden. Calling this has no ef
inAppBrowser.show();
```
-### Future\ InAppBrowser.hide
+#### Future\ InAppBrowser.hide
Hides the `InAppBrowser` window. Calling this has no effect if the `InAppBrowser` was already hidden.
@@ -255,7 +261,7 @@ Hides the `InAppBrowser` window. Calling this has no effect if the `InAppBrowser
inAppBrowser.hide();
```
-### Future\ InAppBrowser.close
+#### Future\ InAppBrowser.close
Closes the `InAppBrowser` window.
@@ -263,7 +269,7 @@ Closes the `InAppBrowser` window.
inAppBrowser.close();
```
-### Future\ InAppBrowser.reload
+#### Future\ InAppBrowser.reload
Reloads the `InAppBrowser` window.
@@ -271,7 +277,7 @@ Reloads the `InAppBrowser` window.
inAppBrowser.reload();
```
-### Future\ InAppBrowser.goBack
+#### Future\ InAppBrowser.goBack
Goes back in the history of the `InAppBrowser` window.
@@ -279,7 +285,7 @@ Goes back in the history of the `InAppBrowser` window.
inAppBrowser.goBack();
```
-### Future\ InAppBrowser.goForward
+#### Future\ InAppBrowser.goForward
Goes forward in the history of the `InAppBrowser` window.
@@ -287,7 +293,7 @@ Goes forward in the history of the `InAppBrowser` window.
inAppBrowser.goForward();
```
-### Future\ InAppBrowser.isLoading
+#### Future\ InAppBrowser.isLoading
Check if the Web View of the `InAppBrowser` instance is in a loading state.
@@ -295,7 +301,7 @@ Check if the Web View of the `InAppBrowser` instance is in a loading state.
inAppBrowser.isLoading();
```
-### Future\ InAppBrowser.stopLoading
+#### Future\ InAppBrowser.stopLoading
Stops the Web View of the `InAppBrowser` instance from loading.
@@ -303,7 +309,7 @@ Stops the Web View of the `InAppBrowser` instance from loading.
inAppBrowser.stopLoading();
```
-### Future\ InAppBrowser.isHidden
+#### Future\ InAppBrowser.isHidden
Check if the Web View of the `InAppBrowser` instance is hidden.
@@ -311,7 +317,7 @@ Check if the Web View of the `InAppBrowser` instance is hidden.
inAppBrowser.isHidden();
```
-### Future\ InAppBrowser.injectScriptCode
+#### Future\ InAppBrowser.injectScriptCode
Injects JavaScript code into the `InAppBrowser` window and returns the result of the evaluation. (Only available when the target is set to `_blank` or to `_self`)
@@ -319,7 +325,7 @@ Injects JavaScript code into the `InAppBrowser` window and returns the result of
inAppBrowser.injectScriptCode(String source);
```
-### Future\ InAppBrowser.injectScriptFile
+#### Future\ InAppBrowser.injectScriptFile
Injects a JavaScript file into the `InAppBrowser` window. (Only available when the target is set to `_blank` or to `_self`)
@@ -327,7 +333,7 @@ Injects a JavaScript file into the `InAppBrowser` window. (Only available when t
inAppBrowser.injectScriptFile(String urlFile);
```
-### Future\ InAppBrowser.injectStyleCode
+#### Future\ InAppBrowser.injectStyleCode
Injects CSS into the `InAppBrowser` window. (Only available when the target is set to `_blank` or to `_self`)
@@ -335,7 +341,7 @@ Injects CSS into the `InAppBrowser` window. (Only available when the target is s
inAppBrowser.injectStyleCode(String source);
```
-### Future\ InAppBrowser.injectStyleFile
+#### Future\ InAppBrowser.injectStyleFile
Injects a CSS file into the `InAppBrowser` window. (Only available when the target is set to `_blank` or to `_self`)
@@ -343,12 +349,186 @@ Injects a CSS file into the `InAppBrowser` window. (Only available when the targ
inAppBrowser.injectStyleFile(String urlFile);
```
+### `ChromeSafariBrowser` class
+Create a Class that extends the `ChromeSafariBrowser` Class in order to override the callbacks to manage the browser events. Example:
+```dart
+import 'package:flutter/material.dart';
+import 'package:flutter_inappbrowser/flutter_inappbrowser.dart';
+
+class MyInAppBrowser extends InAppBrowser {
+
+ @override
+ Future onLoadStart(String url) async {
+ print("\n\nStarted $url\n\n");
+ }
+
+ @override
+ Future onLoadStop(String url) async {
+ print("\n\nStopped $url\n\n");
+ }
+
+ @override
+ void onLoadError(String url, int code, String message) {
+ print("\n\nCan't load $url.. Error: $message\n\n");
+ }
+
+ @override
+ void onExit() {
+ print("\n\nBrowser closed!\n\n");
+ }
+
+}
+
+MyInAppBrowser inAppBrowserFallback = new MyInAppBrowser();
+
+class MyChromeSafariBrowser extends ChromeSafariBrowser {
+
+ MyChromeSafariBrowser(browserFallback) : super(browserFallback);
+
+ @override
+ void onOpened() {
+ print("ChromeSafari browser opened");
+ }
+
+ @override
+ void onLoaded() {
+ print("ChromeSafari browser loaded");
+ }
+
+ @override
+ void onClosed() {
+ print("ChromeSafari browser closed");
+ }
+}
+
+MyChromeSafariBrowser chromeSafariBrowser = new MyChromeSafariBrowser(inAppBrowserFallback);
+
+
+void main() => runApp(new MyApp());
+
+class MyApp extends StatefulWidget {
+ @override
+ _MyAppState createState() => new _MyAppState();
+}
+
+class _MyAppState extends State {
+
+ @override
+ void initState() {
+ super.initState();
+ }
+
+ @override
+ Widget build(BuildContext context) {
+ return new MaterialApp(
+ home: new Scaffold(
+ appBar: new AppBar(
+ title: const Text('Flutter InAppBrowser Plugin example app'),
+ ),
+ body: new Center(
+ child: new RaisedButton(onPressed: () {
+ chromeSafariBrowser.open("https://flutter.io/", options: {
+ "addShareButton": false,
+ "toolbarBackgroundColor": "#000000",
+ "dismissButtonStyle": 1,
+ "preferredBarTintColor": "#000000",
+ },
+ optionsFallback: {
+ "toolbarTopBackgroundColor": "#000000",
+ "closeButtonCaption": "Close"
+ });
+ },
+ child: Text("Open ChromeSafariBrowser")
+ ),
+ ),
+ ),
+ );
+ }
+}
+
+```
+
+#### Future\ ChromeSafariBrowser.open
+Opens an `url` in a new `ChromeSafariBrowser` instance or the system browser.
+
+- `url`: The `url` to load. Call `encodeUriComponent()` on this if the `url` contains Unicode characters.
+
+- `options`: Options for the `ChromeSafariBrowser`.
+
+- `headersFallback`: The additional header of the `InAppBrowser` instance fallback to be used in the HTTP request for this URL, specified as a map from name to value.
+
+- `optionsFallback`: Options used by the `InAppBrowser` instance fallback.
+
+**Android** supports these options:
+
+- __addShareButton__: Set to `false` if you don't want the default share button. The default value is `true`.
+- __showTitle__: Set to `false` if the title shouldn't be shown in the custom tab. The default value is `true`.
+- __toolbarBackgroundColor__: Set the custom background color of the toolbar.
+- __enableUrlBarHiding__: Set to `true` to enable the url bar to hide as the user scrolls down on the page. The default value is `false`.
+- __instantAppsEnabled__: Set to `true` to enable Instant Apps. The default value is `false`.
+
+**iOS** supports these options:
+
+- __entersReaderIfAvailable__: Set to `true` if Reader mode should be entered automatically when it is available for the webpage. The default value is `false`.
+- __barCollapsingEnabled__: Set to `true` to enable bar collapsing. The default value is `false`.
+- __dismissButtonStyle__: Set the custom style for the dismiss button. The default value is `0 //done`. See [SFSafariViewController.DismissButtonStyle](https://developer.apple.com/documentation/safariservices/sfsafariviewcontroller/dismissbuttonstyle) for all the available styles.
+- __preferredBarTintColor__: Set the custom background color of the navigation bar and the toolbar.
+- __preferredControlTintColor__: Set the custom color of the control buttons on the navigation bar and the toolbar.
+- __presentationStyle__: Set the custom modal presentation style when presenting the WebView. The default value is `0 //fullscreen`. See [UIModalPresentationStyle](https://developer.apple.com/documentation/uikit/uimodalpresentationstyle) for all the available styles.
+- __transitionStyle__: Set to the custom transition style when presenting the WebView. The default value is `0 //crossDissolve`. See [UIModalTransitionStyle](https://developer.apple.com/documentation/uikit/uimodaltransitionStyle) for all the available styles.
+
+Example:
+```dart
+chromeSafariBrowser.open("https://flutter.io/", options: {
+ "addShareButton": false,
+ "toolbarBackgroundColor": "#000000",
+ "dismissButtonStyle": 1,
+ "preferredBarTintColor": "#000000",
+});
+```
+
+#### Events
+
+Event fires when the `ChromeSafariBrowser` is opened.
+```dart
+ @override
+ void onOpened() {
+
+ }
+```
+
+Event fires when the `ChromeSafariBrowser` is loaded.
+```dart
+ @override
+ void onLoaded() {
+
+ }
+```
+
+Event fires when the `ChromeSafariBrowser` is closed.
+```dart
+ @override
+ void onClosed() {
+
+ }
+```
+
## Screenshots:
+#### InAppBrowser
iOS:
![ios](https://user-images.githubusercontent.com/5956938/45934084-2a935400-bf99-11e8-9d71-9e1758b5b8c6.gif)
Android:
-![android](https://user-images.githubusercontent.com/5956938/45934080-26ffcd00-bf99-11e8-8136-d39a81bd83e7.gif)
\ No newline at end of file
+![android](https://user-images.githubusercontent.com/5956938/45934080-26ffcd00-bf99-11e8-8136-d39a81bd83e7.gif)
+
+#### ChromeSafariBrowser
+iOS:
+
+![ios](https://user-images.githubusercontent.com/5956938/46532148-0c362e00-c8a0-11e8-9a0e-343e049dcf35.gif)
+
+Android:
+
+![android](https://user-images.githubusercontent.com/5956938/46532149-0c362e00-c8a0-11e8-8134-9af18f38a746.gif)
\ No newline at end of file
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappbrowser/InAppBrowserFlutterPlugin.java b/android/src/main/java/com/pichillilorenzo/flutter_inappbrowser/InAppBrowserFlutterPlugin.java
index c8defd55d..438bebe7e 100644
--- a/android/src/main/java/com/pichillilorenzo/flutter_inappbrowser/InAppBrowserFlutterPlugin.java
+++ b/android/src/main/java/com/pichillilorenzo/flutter_inappbrowser/InAppBrowserFlutterPlugin.java
@@ -485,30 +485,32 @@ public boolean canGoForward(String uuid) {
public static void close(final String uuid) {
final WebViewActivity webViewActivity = webViewActivities.get(uuid);
- registrar.activity().runOnUiThread(new Runnable() {
- @Override
- public void run() {
-
- Map obj = new HashMap<>();
- obj.put("uuid", uuid);
- channel.invokeMethod("onExit", obj);
-
- // The JS protects against multiple calls, so this should happen only when
- // close() is called by other native code.
- if (webViewActivity == null)
- return;
-
- webViewActivity.webView.setWebViewClient(new WebViewClient() {
- // NB: wait for about:blank before dismissing
- public void onPageFinished(WebView view, String url) {
- webViewActivity.close();
+ if (webViewActivity != null) {
+ registrar.activity().runOnUiThread(new Runnable() {
+ @Override
+ public void run() {
+
+ Map obj = new HashMap<>();
+ obj.put("uuid", uuid);
+ channel.invokeMethod("onExit", obj);
+
+ // The JS protects against multiple calls, so this should happen only when
+ // close() is called by other native code.
+ if (webViewActivity == null)
+ return;
+
+ webViewActivity.webView.setWebViewClient(new WebViewClient() {
+ // NB: wait for about:blank before dismissing
+ public void onPageFinished(WebView view, String url) {
+ webViewActivity.close();
+ }
+ });
+ // NB: From SDK 19: "If you call methods on WebView from any thread
+ // other than your app's UI thread, it can cause unexpected results."
+ // http://developer.android.com/guide/webapps/migrating.html#Threads
+ webViewActivity.webView.loadUrl("about:blank");
}
});
- // NB: From SDK 19: "If you call methods on WebView from any thread
- // other than your app's UI thread, it can cause unexpected results."
- // http://developer.android.com/guide/webapps/migrating.html#Threads
- webViewActivity.webView.loadUrl("about:blank");
- }
- });
+ }
}
}
diff --git a/example/lib/main.dart b/example/lib/main.dart
index d312c75ec..373b4fcbb 100644
--- a/example/lib/main.dart
+++ b/example/lib/main.dart
@@ -1,22 +1,17 @@
import 'package:flutter/material.dart';
-
import 'package:flutter_inappbrowser/flutter_inappbrowser.dart';
class MyInAppBrowser extends InAppBrowser {
@override
Future onLoadStart(String url) async {
- print("\n\nStarted aaa $url\n\n");
- inAppBrowserFallback2.open("https://www.google.com", options: {
- "hidden": true
- });
+ print("\n\nStarted $url\n\n");
//print("\n\n ${await this.isHidden()} \n\n");
}
@override
Future onLoadStop(String url) async {
- print("\n\nStopped aaa $url\n\n");
- inAppBrowserFallback2.show();
+ print("\n\nStopped $url\n\n");
// print(await this.injectScriptCode("document.body.innerHTML"));
// print(await this.injectScriptCode("3"));
// print(await this.injectScriptCode("""
@@ -65,40 +60,10 @@ class MyInAppBrowser extends InAppBrowser {
}
}
-class MyInAppBrowser2 extends InAppBrowser {
-
- @override
- Future onLoadStart(String url) async {
- print("\n\nStarted $url\n\n");
- //print("\n\n ${await this.isHidden()} \n\n");
- }
-
- @override
- Future onLoadStop(String url) async {
- print("\n\nStopped $url\n\n");
- }
-
- @override
- void onLoadError(String url, int code, String message) {
- print("\n\nCan't load $url.. Error: $message\n\n");
- }
-
- @override
- void onExit() {
- print("\n\nBrowser closed!\n\n");
- }
-
- @override
- void shouldOverrideUrlLoading(String url) {
- print("\n\n override $url\n\n");
- this.loadUrl(url);
- }
-}
-
MyInAppBrowser inAppBrowserFallback = new MyInAppBrowser();
-MyInAppBrowser2 inAppBrowserFallback2 = new MyInAppBrowser2();
class MyChromeSafariBrowser extends ChromeSafariBrowser {
+
MyChromeSafariBrowser(browserFallback) : super(browserFallback);
@override
@@ -114,7 +79,6 @@ class MyChromeSafariBrowser extends ChromeSafariBrowser {
@override
void onClosed() {
print("ChromeSafari browser closed");
- inAppBrowserFallback.open("https://flutter.io/");
}
}
@@ -143,20 +107,7 @@ class _MyAppState extends State {
),
body: new Center(
child: new RaisedButton(onPressed: () {
- chromeSafariBrowser.open("https://flutter.io/", options: {
- "addShareButton": false,
- "toolbarBackgroundColor": "#000000",
- "dismissButtonStyle": 1,
- "preferredBarTintColor": "#000000",
- },
- optionsFallback: {
- "hidden": true,
- //"toolbarTopFixedTitle": "Fixed title",
- //"useShouldOverrideUrlLoading": true
- //"hideUrlBar": true,
- //"toolbarTop": false,
- //"toolbarBottom": false
- });
+ chromeSafariBrowser.open("https://flutter.io/");
// inAppBrowserFallback.open("https://flutter.io/", options: {
// //"hidden": true,
// //"toolbarTopFixedTitle": "Fixed title",
diff --git a/ios/Classes/SafariBrowserOptions.swift b/ios/Classes/SafariBrowserOptions.swift
index d5c9c9423..cc8e0676e 100644
--- a/ios/Classes/SafariBrowserOptions.swift
+++ b/ios/Classes/SafariBrowserOptions.swift
@@ -15,6 +15,8 @@ public class SafariBrowserOptions: Options {
var dismissButtonStyle = 0 //done
var preferredBarTintColor = ""
var preferredControlTintColor = ""
+ var presentationStyle = 0 //fullscreen
+ var transitionStyle = 0 //crossDissolve
override init(){
super.init()
diff --git a/ios/Classes/SafariViewController.swift b/ios/Classes/SafariViewController.swift
index bc35e4bbf..218bb6552 100644
--- a/ios/Classes/SafariViewController.swift
+++ b/ios/Classes/SafariViewController.swift
@@ -34,6 +34,9 @@ class SafariViewController: SFSafariViewController, SFSafariViewControllerDelega
self.preferredControlTintColor = color(fromHexString: (safariOptions?.preferredControlTintColor)!)
}
}
+
+ self.modalPresentationStyle = UIModalPresentationStyle(rawValue: (safariOptions?.presentationStyle)!)!
+ self.modalTransitionStyle = UIModalTransitionStyle(rawValue: (safariOptions?.transitionStyle)!)!
}
func close() {
diff --git a/lib/flutter_inappbrowser.dart b/lib/flutter_inappbrowser.dart
index 317275155..624de94eb 100644
--- a/lib/flutter_inappbrowser.dart
+++ b/lib/flutter_inappbrowser.dart
@@ -303,7 +303,7 @@ class ChromeSafariBrowser {
String uuid;
InAppBrowser browserFallback;
- ///
+ ///Initialize the [ChromeSafariBrowser] instance with a [InAppBrowser] fallback instance or `null`.
ChromeSafariBrowser (bf) {
uuid = uuidGenerator.v4();
browserFallback = bf;
@@ -325,7 +325,33 @@ class ChromeSafariBrowser {
return new Future.value("");
}
+ ///Opens an [url] in a new [ChromeSafariBrowser] instance or the system browser.
+ ///
+ ///- [url]: The [url] to load. Call [encodeUriComponent()] on this if the [url] contains Unicode characters.
+ ///
+ ///- [options]: Options for the [ChromeSafariBrowser].
+ ///
+ ///- [headersFallback]: The additional header of the [InAppBrowser] instance fallback to be used in the HTTP request for this URL, specified as a map from name to value.
+ ///
+ ///- [optionsFallback]: Options used by the [InAppBrowser] instance fallback.
+ ///
+ ///**Android** supports these options:
+ ///
+ ///- __addShareButton__: Set to `false` if you don't want the default share button. The default value is `true`.
+ ///- __showTitle__: Set to `false` if the title shouldn't be shown in the custom tab. The default value is `true`.
+ ///- __toolbarBackgroundColor__: Set the custom background color of the toolbar.
+ ///- __enableUrlBarHiding__: Set to `true` to enable the url bar to hide as the user scrolls down on the page. The default value is `false`.
+ ///- __instantAppsEnabled__: Set to `true` to enable Instant Apps. The default value is `false`.
+ ///
+ ///**iOS** supports these options:
///
+ ///- __entersReaderIfAvailable__: Set to `true` if Reader mode should be entered automatically when it is available for the webpage. The default value is `false`.
+ ///- __barCollapsingEnabled__: Set to `true` to enable bar collapsing. The default value is `false`.
+ ///- __dismissButtonStyle__: Set the custom style for the dismiss button. The default value is `0 //done`. See [SFSafariViewController.DismissButtonStyle](https://developer.apple.com/documentation/safariservices/sfsafariviewcontroller/dismissbuttonstyle) for all the available styles.
+ ///- __preferredBarTintColor__: Set the custom background color of the navigation bar and the toolbar.
+ ///- __preferredControlTintColor__: Set the custom color of the control buttons on the navigation bar and the toolbar.
+ ///- __presentationStyle__: Set the custom modal presentation style when presenting the WebView. The default value is `0 //fullscreen`. See [UIModalPresentationStyle](https://developer.apple.com/documentation/uikit/uimodalpresentationstyle) for all the available styles.
+ ///- __transitionStyle__: Set to the custom transition style when presenting the WebView. The default value is `0 //crossDissolve`. See [UIModalTransitionStyle](https://developer.apple.com/documentation/uikit/uimodaltransitionStyle) for all the available styles.
Future open(String url, {Map options = const {}, Map headersFallback = const {}, Map optionsFallback = const {}}) async {
Map args = {};
args.putIfAbsent('uuid', () => uuid);