Flutter & Dart · Function
dispose
State.dispose runs when a State is permanently removed. Use it to release resources and unsubscribe, then call super.dispose(); the State is unmounted afterward.
Last updated
Syntax
@protected @override void dispose()In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
deactivateinitStatedidUpdateWidgetmountedsetState