Migrate a Flutter App from WidgetsBindingObserver.didChangeAppLifecycleState to AppLifecycleListener (Flutter 3.13+)
Replace hand-rolled WidgetsBindingObserver lifecycle code with AppLifecycleListener: the callback mapping, the state machine it enforces, the new hidden state that breaks exhaustive switches, desktop exit requests, and the test that suddenly asserts. Tested on Flutter 3.44.8 with Dart 3.12.2.