isFeatureSupported method

  1. @SupportedPlatforms.new(platforms: [AndroidPlatform(apiName: 'WebViewFeature.isFeatureSupported', apiUrl: 'https://developer.android.com/reference/androidx/webkit/WebViewFeature#isFeatureSupported(java.lang.String)')])
Future<bool> isFeatureSupported(
  1. WebViewFeature feature
)

Return whether a feature is supported at run-time. On devices running Android version Build.VERSION_CODES.LOLLIPOP and higher, this will check whether a feature is supported, depending on the combination of the desired feature, the Android version of device, and the WebView APK on the device. If running on a device with a lower API level, this will always return false.

Note: This method is different from isStartupFeatureSupported and this method only accepts certain features. Please verify that the correct feature checking method is used for a particular feature.

Note: If this method returns false, it is not safe to invoke the methods requiring the desired feature. Furthermore, if this method returns false for a particular feature, any callback guarded by that feature will not be invoked.

Officially Supported Platforms/Implementations:

Parameters - Officially Supported Platforms/Implementations:

  • feature: all platforms

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

Implementation

@SupportedPlatforms(
  platforms: [
    AndroidPlatform(
      apiName: 'WebViewFeature.isFeatureSupported',
      apiUrl:
          'https://developer.android.com/reference/androidx/webkit/WebViewFeature#isFeatureSupported(java.lang.String)',
    ),
  ],
)
Future<bool> isFeatureSupported(WebViewFeature feature) {
  throw UnimplementedError(
    'isFeatureSupported is not implemented on the current platform',
  );
}