remove observer on dispose

This commit is contained in:
Neeraj Gupta 2022-03-07 23:03:41 +05:30
parent 25ef4203cb
commit 78fb56bb34
No known key found for this signature in database
GPG key ID: 3C5A1684DC1729E1

View file

@ -86,6 +86,12 @@ class _EnteAppState extends State<EnteApp> with WidgetsBindingObserver {
);
}
@override
void dispose() {
WidgetsBinding.instance.removeObserver(this);
super.dispose();
}
@override
void didChangeAppLifecycleState(AppLifecycleState state) {
if (state == AppLifecycleState.resumed) {