setAllowContentAccess method
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
.
NOTE: available on Android 24+.
Official Android API: https://developer.android.com/reference/androidx/webkit/ServiceWorkerWebSettingsCompat#setAllowContentAccess(boolean)
Implementation
@override
Future<void> setAllowContentAccess(bool allow) async {
Map<String, dynamic> args = <String, dynamic>{};
args.putIfAbsent("allow", () => allow);
await channel?.invokeMethod('setAllowContentAccess', args);
}