sw 0.0.5
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.
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'))),
),
);
}