flutter_lifecycle_aware 0.0.3 flutter_lifecycle_aware: ^0.0.3 copied to clipboard
A library that make flutter to have a lifecycle like android or iOS. It can sense the lifecycle wherever you need them.
Use this package as a library
Depend on it
Run this command:
With Flutter:
$ flutter pub add flutter_lifecycle_aware
This will add a line like this to your package's pubspec.yaml (and run an implicit flutter pub get
):
dependencies:
flutter_lifecycle_aware: ^0.0.3
Alternatively, your editor might support flutter pub get
. Check the docs for your editor to learn more.
Import it
Now in your Dart code, you can use:
import 'package:flutter_lifecycle_aware/lifecycle.dart';
import 'package:flutter_lifecycle_aware/lifecycle_delegate.dart';
import 'package:flutter_lifecycle_aware/lifecycle_dispatcher.dart';
import 'package:flutter_lifecycle_aware/lifecycle_observable.dart';
import 'package:flutter_lifecycle_aware/lifecycle_observable_impl.dart';
import 'package:flutter_lifecycle_aware/lifecycle_observer.dart';
import 'package:flutter_lifecycle_aware/lifecycle_owner.dart';
import 'package:flutter_lifecycle_aware/lifecycle_route_observer.dart';
import 'package:flutter_lifecycle_aware/lifecycle_state.dart';