LifecycleCallback typedef Null safety

LifecycleCallback = FutureOr<void> Function(AppLifecycleState? previous, AppLifecycleState current)

A callback triggered when the app life cycle changes.

Implementation

typedef LifecycleCallback = FutureOr<void> Function(
  AppLifecycleState? previous,
  AppLifecycleState current,
);