I am developing a note app, and I want to save my note when I closed the app (when removing the app from recent apps).
I tried dispose()
method but it did not work.
I tried :
@override
void didChangeAppLifecycleState(AppLifecycleState state) {
print(state);
final isDetached = state == AppLifecycleState.detached;}
but it did not work too. it does not print detached status, just it prints AppLifecycleState.paused
AppLifecycleState.inactive
AppLifecycleState.resume
so what should I do here!!