sw 0.0.5 copy "sw: ^0.0.5" to clipboard
sw: ^0.0.5 copied to clipboard

A command-line tool to generate service worker files for web applications. It simplifies the process of creating service workers.

example/lib/main.dart

import 'dart:async';

import 'package:flutter/material.dart';
import 'package:sw_example/src/initialization.dart';

void main() => runZonedGuarded<void>(
  () async {
    await initializeApp();
    runApp(const App());
  },
  (error, stackTrace) =>
      print('Top level exception: $error'), // ignore: avoid_print
);

/// {@template app}
/// App widget.
/// {@endtemplate}
class App extends StatelessWidget {
  /// {@macro app}
  const App({super.key});

  @override
  Widget build(BuildContext context) => MaterialApp(
    title: 'Application',
    home: Scaffold(
      appBar: AppBar(title: const Text('Application')),
      body: const SafeArea(child: Center(child: Text('Hello World'))),
    ),
  );
}
5
likes
150
points
135
downloads

Publisher

verified publisherplugfox.dev

Weekly Downloads

A command-line tool to generate service worker files for web applications. It simplifies the process of creating service workers.

Repository (GitHub)
View/report issues
Contributing

Topics

#service-worker #generator #cli #web #flutter

Documentation

API reference

License

MIT (license)

Dependencies

args, crypto, glob, path

More

Packages that depend on sw