AndroidServiceWorkerController class Null safety

Class that represents an Android-specific class that manages Service Workers used by WebView.

NOTE: available on Android 24+.

Official Android API: https://developer.android.com/reference/androidx/webkit/ServiceWorkerControllerCompat

Constructors

AndroidServiceWorkerController()

Properties

hashCode int
The hash code for this object. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
serviceWorkerClient AndroidServiceWorkerClient?
read / write

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
A string representation of this object. [...]
inherited

Operators

operator ==(Object other) bool
The equality operator. [...]
inherited

Static Methods

getAllowContentAccess() Future<bool>
Gets whether Service Workers support content URL access. This method should only be called if AndroidWebViewFeature.isFeatureSupported returns true for AndroidWebViewFeature.SERVICE_WORKER_CONTENT_ACCESS. [...]
getAllowFileAccess() Future<bool>
Gets whether Service Workers support file access. This method should only be called if AndroidWebViewFeature.isFeatureSupported returns true for AndroidWebViewFeature.SERVICE_WORKER_FILE_ACCESS. [...]
getBlockNetworkLoads() Future<bool>
Gets whether Service Workers are prohibited from loading any resources from the network. This method should only be called if AndroidWebViewFeature.isFeatureSupported returns true for AndroidWebViewFeature.SERVICE_WORKER_BLOCK_NETWORK_LOADS. [...]
getCacheMode() Future<AndroidCacheMode?>
Gets the current setting for overriding the cache mode. This method should only be called if AndroidWebViewFeature.isFeatureSupported returns true for AndroidWebViewFeature.SERVICE_WORKER_CACHE_MODE. [...]
instance() AndroidServiceWorkerController
Gets the AndroidServiceWorkerController shared instance.
setAllowContentAccess(bool allow) Future<void>
Enables or disables content URL access from Service Workers. This method should only be called if AndroidWebViewFeature.isFeatureSupported returns true for AndroidWebViewFeature.SERVICE_WORKER_CONTENT_ACCESS. [...]
setAllowFileAccess(bool allow) Future<void>
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. [...]
setBlockNetworkLoads(bool flag) Future<void>
Sets whether Service Workers should not load resources from the network. This method should only be called if AndroidWebViewFeature.isFeatureSupported returns true for AndroidWebViewFeature.SERVICE_WORKER_BLOCK_NETWORK_LOADS. [...]
setCacheMode(AndroidCacheMode mode) Future<void>
Overrides the way the cache is used. This method should only be called if AndroidWebViewFeature.isFeatureSupported returns true for AndroidWebViewFeature.SERVICE_WORKER_CACHE_MODE. [...]