AppStateObserver constructor

AppStateObserver({
  1. AppEventCallback? onAppEvent,
})

Creates an AppStateObserver and registers it with the WidgetsBinding.

Implementation

AppStateObserver({this.onAppEvent}) {
  WidgetsBinding.instance.addObserver(this);
}