flutter

Avoid setState after dispose solution

Override setState function to avoid calling setState after dispose

@override
void setState(VoidCallback fn) {
    if(mounted) {
        super.setState(fn);
    }
}
Was this helpful?