setAllowFileAccess method
- @SupportedPlatforms.new(platforms: [AndroidPlatform(apiName: 'ServiceWorkerWebSettingsCompat.setAllowFileAccess', apiUrl: 'https://developer.android.com/reference/androidx/webkit/ServiceWorkerWebSettingsCompat#setAllowFileAccess(boolean)')])
- bool allow
Enables or disables file access within Service Workers.
This method should only be called if WebViewFeature.isFeatureSupported returns true for WebViewFeature.SERVICE_WORKER_FILE_ACCESS.
Officially Supported Platforms/Implementations:
- Android WebView (Official API - ServiceWorkerWebSettingsCompat.setAllowFileAccess)
Parameters - Officially Supported Platforms/Implementations:
allow: all platforms
Use the PlatformServiceWorkerController.isMethodSupported method to check if this method is supported at runtime.
Implementation
@SupportedPlatforms(
platforms: [
AndroidPlatform(
apiName: 'ServiceWorkerWebSettingsCompat.setAllowFileAccess',
apiUrl:
'https://developer.android.com/reference/androidx/webkit/ServiceWorkerWebSettingsCompat#setAllowFileAccess(boolean)',
),
],
)
Future<void> setAllowFileAccess(bool allow) {
throw UnimplementedError(
'setAllowFileAccess is not implemented on the current platform',
);
}