web_update_guard 0.1.0 copy "web_update_guard: ^0.1.0" to clipboard
web_update_guard: ^0.1.0 copied to clipboard

Stop Flutter web users running stale cached builds. A CLI stamps and cache-busts build/web; a runtime guard detects new deploys and reloads cleanly.

0.1.0 #

  • Initial release.
  • dart run web_update_guard stamp build/web: content-hash + timestamp build ID, version.json (merged with Flutter's own keys), ?v=<buildId> cache-busting of main.dart.js, flutter_bootstrap.js, flutter.js, main.dart.wasm and main.dart.mjs, build-ID <meta> tag. Idempotent.
  • WebUpdateGuard: polling, focus / visibility checks, no-store + cache-busted version.json fetch, Stream<UpdateStatus>, checkNow(), applyUpdate() (unregister service workers, clear CacheStorage, refresh the document, reload), auto-reload policies never / whenIdle / immediately, reload-loop guard. No-op (unsupported) off the web.
  • Widgets: UpdateBanner (inline MaterialBanner or custom builder) and WebUpdateListener (SnackBar / MaterialBanner via ScaffoldMessenger).
0
likes
160
points
0
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Stop Flutter web users running stale cached builds. A CLI stamps and cache-busts build/web; a runtime guard detects new deploys and reloads cleanly.

Repository (GitHub)
View/report issues

Topics

#web #cache #deployment #service-worker #update

License

MIT (license)

Dependencies

args, crypto, flutter, meta, path, web, yaml

More

Packages that depend on web_update_guard