Flattern -Widget Destructor
//In a state of a statefull widget
@override
void dispose() {
_bloc.dispose();
super.dispose();
}
Modern Manx
//In a state of a statefull widget
@override
void dispose() {
_bloc.dispose();
super.dispose();
}
Dart does not have destructors.
Objects are automatically garbage collected when no longer referenced
In flutter we can do like for widget dispose:
@override
void dispose() {
// your dispose part
super.dispose();
}