activeServiceWorkerUrl static method

String? activeServiceWorkerUrl()

Script URL of the service worker serving this page, e.g. ".../flutter_service_worker.js?v=123".

Implementation

static String? activeServiceWorkerUrl() {
  try {
    return web.window.navigator.serviceWorker.controller?.scriptURL;
  } catch (_) {
    return null;
  }
}