open method

Future<void> open({
  1. WebUri? url,
  2. Map<String, String>? headers,
  3. List<WebUri>? otherLikelyURLs,
  4. WebUri? referrer,
  5. @Deprecated('Use settings instead') ChromeSafariBrowserClassOptions? options,
  6. ChromeSafariBrowserSettings? settings,
})

Opens the PlatformChromeSafariBrowser instance with an url.

url - The url to load. On iOS, the url is required and must use the http or https scheme.

headers - whitelisted cross-origin request headers. It is possible to attach non-whitelisted headers to cross-origin requests, when the server and client are related using a digital asset link.

otherLikelyURLs - Other likely destinations, sorted in decreasing likelihood order.

referrer - referrer header.

options - Deprecated. Use settings instead.

settings - Settings for the PlatformChromeSafariBrowser.

Officially Supported Platforms/Implementations:

  • Android Chrome Custom Tabs
  • iOS SFSafariViewController

Parameters - Officially Supported Platforms/Implementations:

  • url: all platforms
  • headers:
    • Android Chrome Custom Tabs
  • otherLikelyURLs:
    • Android Chrome Custom Tabs
  • referrer:
    • Android Chrome Custom Tabs
  • settings: all platforms

Use the PlatformChromeSafariBrowser.isMethodSupported method to check if this method is supported at runtime.

Implementation

Future<void> open({
  WebUri? url,
  Map<String, String>? headers,
  List<WebUri>? otherLikelyURLs,
  WebUri? referrer,
  @Deprecated('Use settings instead')
  // ignore: deprecated_member_use_from_same_package
  ChromeSafariBrowserClassOptions? options,
  ChromeSafariBrowserSettings? settings,
}) {
  this.platform.eventHandler = this;
  return platform.open(
    url: url,
    headers: headers,
    otherLikelyURLs: otherLikelyURLs,
    options: options,
    settings: settings,
  );
}