LifecycleWidget constructor

const LifecycleWidget({
  1. required Widget child,
  2. VoidCallback? onResume,
  3. VoidCallback? onPause,
  4. VoidCallback? onDetached,
  5. VoidCallback? onInactive,
  6. VoidCallback? onHidden,
})

Helper widget for reacting to lifecycle events. This widget listens to changes in the AppLifecycleState.

Implementation

const LifecycleWidget({
  required this.child,
  this.onResume,
  this.onPause,
  this.onDetached,
  this.onInactive,
  this.onHidden,
});