setServiceWorkerClient method

  1. @override
Future<void> setServiceWorkerClient(
  1. ServiceWorkerClient? value
)

Sets the client to capture service worker related callbacks. A ServiceWorkerClient should be set before any service workers are active, e.g. a safe place is before any WebView instances are created or pages loaded.

Officially Supported Platforms/Implementations:

Implementation

@override
Future<void> setServiceWorkerClient(ServiceWorkerClient? value) async {
  Map<String, dynamic> args = <String, dynamic>{};
  args.putIfAbsent('isNull', () => value == null);
  await channel?.invokeMethod("setServiceWorkerClient", args);
  _serviceWorkerClient = value;
}