isBlockedByScreenTime method
- @SupportedPlatforms(platforms: [IOSPlatform(available: '26.0', apiName: 'WKWebView.isBlockedByScreenTime', apiUrl: 'https://developer.apple.com/documentation/webkit/wkwebview/isblockedbyscreentime'), MacOSPlatform(available: '26.0', apiName: 'WKWebView.isBlockedByScreenTime', apiUrl: 'https://developer.apple.com/documentation/webkit/wkwebview/isblockedbyscreentime')])
Returns whether Screen Time is currently blocking this WebView.
Officially Supported Platforms/Implementations:
- iOS WKWebView 26.0+ (Official API - WKWebView.isBlockedByScreenTime)
- macOS WKWebView 26.0+ (Official API - WKWebView.isBlockedByScreenTime)
Use the PlatformInAppWebViewController.isMethodSupported method to check if this method is supported at runtime.
Implementation
@SupportedPlatforms(
platforms: [
IOSPlatform(
available: '26.0',
apiName: 'WKWebView.isBlockedByScreenTime',
apiUrl:
'https://developer.apple.com/documentation/webkit/wkwebview/isblockedbyscreentime',
),
MacOSPlatform(
available: '26.0',
apiName: 'WKWebView.isBlockedByScreenTime',
apiUrl:
'https://developer.apple.com/documentation/webkit/wkwebview/isblockedbyscreentime',
),
],
)
Future<bool> isBlockedByScreenTime() {
throw UnimplementedError(
'${PlatformInAppWebViewControllerMethod.isBlockedByScreenTime.name} is not implemented on the current platform',
);
}