setAllowFileAccess static method

Future<void> setAllowFileAccess(
  1. bool allow
)

Enables or disables file access within Service Workers. This method should only be called if AndroidWebViewFeature.isFeatureSupported returns true for AndroidWebViewFeature.SERVICE_WORKER_FILE_ACCESS.

NOTE: available on Android 24+.

Official Android API: https://developer.android.com/reference/androidx/webkit/ServiceWorkerWebSettingsCompat#setAllowFileAccess(boolean)

Implementation

static Future<void> setAllowFileAccess(bool allow) async {
  await ServiceWorkerController.setAllowFileAccess(allow);
}