ServiceWorkerClient class
Class used by clients to capture Service Worker related callbacks.
NOTE: available on Android 24+.
Officially Supported Platforms/Implementations:
- Android native WebView (Official API - ServiceWorkerClientCompat)
Constructors
-
ServiceWorkerClient({Future<
WebResourceResponse?> shouldInterceptRequest(WebResourceRequest request)?})
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
shouldInterceptRequest
→ Future<
WebResourceResponse?> Function(WebResourceRequest request)? -
Notify the host application of a resource request and allow the application to return the data.
If the return value is
null
, the Service Worker will continue to load the resource as usual. Otherwise, the return response and data will be used.final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited