Beginner
Flutter
Q37 / 100
What is the dispose() lifecycle method used for in Flutter?
Correct! Well done.
Incorrect.
The correct answer is B) Called when the State object is permanently removed; used to release resources like controllers and stream subscriptions
B
Correct Answer
Called when the State object is permanently removed; used to release resources like controllers and stream subscriptions
Explanation
dispose() is called when the State object is permanently removed from the tree. Override it to release resources acquired in initState(): TextEditingControllers, AnimationControllers, StreamSubscriptions, and FocusNodes.
Progress
37/100