I am new to flutter, and I want to make sure that I dont have any loose initializations when i pop a screen. Is there a way to check for loose initializations from variables, listeners or streams to avoid memory leaks?
2 Replies
You can remove all listener or streams by overriding dispose method
@override
void dispose() {
super.dispose();
//listeners to remove
}
Thanks for your support.