didChangeAppLifecycleState property
Called when the system puts the app in the background or returns the app to the foreground.
The third parameter depends on the mixin used. It is a TickerProvider for tickerProviderStateMixin
Implementation
final void Function(BuildContext context, AppLifecycleState state)?
didChangeAppLifecycleState;