Flutter Guideline: State — Avoid setState in build. Description: Never call setState during build. Do: setState in callbacks only. Don't: setState in build method. Good Example: onPressed: () => setState(() {}). Bad Example: build() { setState(); }. Severity: High. Docs: .