Skip to content
masterclass Buddy

Flutter & Dart · Class

StatefulWidget

A StatefulWidget describes UI that can change over time. Its immutable widget object gets a separate State object for mutable data and rebuilding.

Last updated

Syntax

abstract class StatefulWidget extends Widget {
  const StatefulWidget({Key? key});
  State<StatefulWidget> createState();
}

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • State
  • StatelessWidget
  • InheritedWidget
  • BuildContext
  • State.setState
  • State.initState
  • State.didChangeDependencies
  • State.dispose

Source: StatefulWidget class - widgets library - Dart API. Checked 2026-11-03.