isAvailable method

  1. @SupportedPlatforms.new(platforms: [AndroidPlatform(), IOSPlatform()])
Future<bool> isAvailable()

On Android, returns true if Chrome Custom Tabs is available. On iOS, returns true if SFSafariViewController is available. Otherwise returns false.

Officially Supported Platforms/Implementations:

  • Android Chrome Custom Tabs
  • iOS SFSafariViewController

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

Implementation

@SupportedPlatforms(platforms: [AndroidPlatform(), IOSPlatform()])
Future<bool> isAvailable() {
  throw UnimplementedError(
    'isAvailable is not implemented on the current platform',
  );
}