Member-only story
Flutter Lifecycle In 15 Minutes
3 min readNov 12, 2021
Why should we care about the Flutter App lifecycle? I mean, we only have these app lifecycle events; push, visible, active, inactive, invisible, and pop. If we can hook into the flutter app lifecycle, we can better react to user events.
I am going to show you a new plugin to use to hook into the Flutter App lifecycle and how to implement an app log overlay.
Lifecycle Plugin
The lifecycle plugin:
Is in stalled via this in your pubspec:
dependencies:
lifecycle: ^0.4.1
There are two ways to use it, one is using the wrapper:
By just using a wrapper:
return LifecycleWrapper(