Skip to content
masterclass Buddy

Flutter & Dart · Function

build

The build method describes a widget's user interface subtree. Flutter calls it when the widget is inserted or an inherited dependency changes, and it must return widgets without side effects.

Last updated

Syntax

Widget build(BuildContext context)

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

Subscribe
  • StatelessWidget
  • StatefulWidget
  • BuildContext.dependOnInheritedWidgetOfExactType
  • Widget.canUpdate

Source: build method - Builder class - widgets library - Dart API. Checked 2026-11-03.