Skip to main content

sw 0.3.0 copy "sw: ^0.3.0" to clipboard
sw: ^0.3.0 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/home/home_screen.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});

  static const Color _brand = Color(0xFF25D366);

  @override
  Widget build(BuildContext context) => MaterialApp(
    title: 'Service Worker Generator',
    debugShowCheckedModeBanner: false,
    theme: ThemeData(colorSchemeSeed: _brand),
    darkTheme: ThemeData(colorSchemeSeed: _brand, brightness: Brightness.dark),
    home: const HomeScreen(),
  );
}
20
likes
0
points
5.11k
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

Topics

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

License

unknown (license)

Dependencies

args, crypto, glob, path, yaml

More

Packages that depend on sw