setAllowContentAccess static method
- bool allow
Enables or disables content URL access from Service Workers.
This method should only be called if WebViewFeature.isFeatureSupported returns true for WebViewFeature.SERVICE_WORKER_CONTENT_ACCESS.
Officially Supported Platforms/Implementations:
- Android WebView (Official API - ServiceWorkerWebSettingsCompat.setAllowContentAccess)
Parameters - Officially Supported Platforms/Implementations:
allow: all platforms
Use the PlatformServiceWorkerController.isMethodSupported method to check if this method is supported at runtime.
Implementation
static Future<void> setAllowContentAccess(bool allow) =>
PlatformServiceWorkerController.static().setAllowContentAccess(allow);