Skip to content
masterclass Buddy

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.

Subscribe
  • deactivate
  • initState
  • didUpdateWidget
  • mounted
  • setState

Source: dispose method - RefreshIndicatorState class - material library - Dart API. Checked 2026-11-03.