handlesURLScheme method
- @SupportedPlatforms.new(platforms: [IOSPlatform(apiName: 'WKWebView.handlesURLScheme', apiUrl: 'https://developer.apple.com/documentation/webkit/wkwebview/2875370-handlesurlscheme', available: '11.0'), MacOSPlatform(apiName: 'WKWebView.handlesURLScheme', apiUrl: 'https://developer.apple.com/documentation/webkit/wkwebview/2875370-handlesurlscheme', available: '10.13'), LinuxPlatform(note: 'Returns true for built-in schemes (http, https, file, ftp, data, blob, about, javascript).')])
- String urlScheme
Returns a Boolean value that indicates whether WebKit natively supports resources with the specified URL scheme.
urlScheme represents the URL scheme associated with the resource.
Officially Supported Platforms/Implementations:
- iOS WKWebView 11.0+ (Official API - WKWebView.handlesURLScheme)
- macOS WKWebView 10.13+ (Official API - WKWebView.handlesURLScheme)
- Linux WPE WebKit:
- Returns true for built-in schemes (http, https, file, ftp, data, blob, about, javascript).
Parameters - Officially Supported Platforms/Implementations:
urlScheme: all platforms
Use the PlatformInAppWebViewController.isMethodSupported method to check if this method is supported at runtime.
Implementation
@SupportedPlatforms(
platforms: [
IOSPlatform(
apiName: 'WKWebView.handlesURLScheme',
apiUrl:
'https://developer.apple.com/documentation/webkit/wkwebview/2875370-handlesurlscheme',
available: '11.0',
),
MacOSPlatform(
apiName: 'WKWebView.handlesURLScheme',
apiUrl:
'https://developer.apple.com/documentation/webkit/wkwebview/2875370-handlesurlscheme',
available: '10.13',
),
LinuxPlatform(
note:
'Returns true for built-in schemes (http, https, file, ftp, data, blob, about, javascript).',
),
],
)
Future<bool> handlesURLScheme(String urlScheme) {
throw UnimplementedError(
'${PlatformInAppWebViewControllerMethod.handlesURLScheme.name} is not implemented on the current platform',
);
}