detachedAppLifecycleState method
Either be in the progress of attaching when the engine is first initializing or after the view being destroyed due to a Navigator pop. The application is still hosted on a flutter engine but is detached from any host views. Its firing will depending on the hosting operating system: https://github.com/flutter/flutter/issues/124945#issuecomment-1514159238
Implementation
@override
void detachedAppLifecycleState() {
// Don't call dispose() if in testing
if (inWidgetsFlutterBinding) {
if (!_disposed) {
dispose();
}
//
try {
// runZonedGuarded<void>(() {
super.detachedAppLifecycleState();
} catch (e) {
// }, (error, stackTrace) {
// Record error in device's log
_logPackageError(
e,
library: 'part01_statex.dart',
description: 'Error in detachedAppLifecycleState()',
);
// });
}
}
}