page_life_cycle 1.1.1 page_life_cycle: ^1.1.1 copied to clipboard
Because the widget of the flitter does not route the Onshow and onhide events, the Onshow and onhide events of the widget are added according to the routing changes.
Use this package as a library
Depend on it
Run this command:
With Flutter:
$ flutter pub add page_life_cycle
This will add a line like this to your package's pubspec.yaml (and run an implicit flutter pub get
):
dependencies:
page_life_cycle: ^1.1.1
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:page_life_cycle/page_life_cycle.dart';