mayLaunchUrl method

  1. @SupportedPlatforms.new(platforms: [AndroidPlatform(apiName: 'CustomTabsSession.mayLaunchUrl', apiUrl: 'https://developer.android.com/reference/androidx/browser/customtabs/CustomTabsSession#mayLaunchUrl(android.net.Uri,android.os.Bundle,java.util.List%3Candroid.os.Bundle%3E)')])
Future<bool> mayLaunchUrl({
  1. WebUri? url,
  2. List<WebUri>? otherLikelyURLs,
})

Tells the browser of a likely future navigation to a URL. The most likely URL has to be specified first. Optionally, a list of other likely URLs can be provided. They are treated as less likely than the first one, and have to be sorted in decreasing priority order. These additional URLs may be ignored. All previous calls to this method will be deprioritized.

url - Most likely URL, may be null if otherLikelyBundles is provided.

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

Officially Supported Platforms/Implementations:

Parameters - Officially Supported Platforms/Implementations:

  • url: all platforms
  • otherLikelyURLs: all platforms

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

Implementation

@SupportedPlatforms(
  platforms: [
    AndroidPlatform(
      apiName: 'CustomTabsSession.mayLaunchUrl',
      apiUrl:
          'https://developer.android.com/reference/androidx/browser/customtabs/CustomTabsSession#mayLaunchUrl(android.net.Uri,android.os.Bundle,java.util.List%3Candroid.os.Bundle%3E)',
    ),
  ],
)
Future<bool> mayLaunchUrl({WebUri? url, List<WebUri>? otherLikelyURLs}) {
  throw UnimplementedError(
    'mayLaunchUrl is not implemented on the current platform',
  );
}