app_lifecycle_observer 0.0.2 copy "app_lifecycle_observer: ^0.0.2" to clipboard
app_lifecycle_observer: ^0.0.2 copied to clipboard

Flutter lifecycle observer independent of context.

example/lib/main.dart

import 'package:app_lifecycle_observer_example/router/router.dart';
import 'package:flutter/material.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp.router(
      routerDelegate: goRouter.routerDelegate,
      routeInformationParser: goRouter.routeInformationParser,
      routeInformationProvider: goRouter.routeInformationProvider,
      title: 'AppLifecycleObserver',
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
        useMaterial3: true,
      ),
    );
  }
}
4
likes
150
points
30
downloads

Publisher

unverified uploader

Weekly Downloads

Flutter lifecycle observer independent of context.

Repository (GitHub)
View/report issues

Documentation

API reference

License

Apache-2.0 (license)

Dependencies

flutter

More

Packages that depend on app_lifecycle_observer