Skip to content
pubscout

sw

0.5.0, released 10 days ago by plugfox.dev

Generates a Flutter Web service worker and bootstrap script with caching and progress.

$ flutter pub add sw
Source repository

What it does

Generates an optimized service worker and bootstrap pipeline for Flutter Web. It replaces the default bootstrap with a loading screen, progress tracking, intelligent caching, and CanvasKit CDN loading.

AI-written summary of version 0.5.0, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You are building a Flutter Web application and want custom loading progress.
  • You need reliable service worker caching and update prompts for web deployments.

Skip it when

  • You are building mobile or desktop native applications without web targets.

Strengths

  • Provides a controlled initialization pipeline and loading widget.
  • Supports smart resource categorization and cache busting.

Weaknesses

  • Requires careful server configuration with no-cache headers for bootstrap files.

Setup

Kind
Pure Dart
Effort
Medium
Code generation
No
Direct dependencies
5

Requires running the CLI generator and updating index.html and server headers.

dart run sw:generate --input=build/web --prefix=my-app

Works with

Packages commonly used together with sw: ones it builds on, ones built on it, and its own family.