Previously, the Form widget essentially acted as a direct wrapper around its child. This design allowed a Form containing a sliver child (e.g., Form(child: other sliver)) to be treated as a sliver itself within a CustomScrollView or similar scrollable parent.
Original behavior
This change is part of an ongoing effort to improve the accessibility and semantic understanding of Flutter widgets. By embedding a semantics widget directly within Form, the framework can provide better information to accessibility services.
New behavior
The core change is the integration of a semantics widget into the Form widget's build method.
- Who is affected
- Applications and packages relying on the previous behaviour or signature. Code that uses Form.
- Practical impact
- Behaviour or API differences that can break builds or change runtime behaviour.
- What action should I take?
- Follow the official migration guide below, update affected call sites, run `dart fix --apply` where a fix is available, then run your tests.
Before and after (from the official guide)
| 1 | − | sliver: Form( |
| 2 | − | key: controller.formKey, |
| 3 | − | child: SomeWidgetWithFormFields(), |
| 4 | ) |
| 1 | + | sliver: SliverToBoxAdapter( |
| 2 | + | child: Form( |
| 3 | + | key: controller.formKey, |
| 4 | + | child: SomeWidgetWithFormFields(), |
| 5 | + | ) |
| 6 | ) |
Raw before / after
sliver: Form(
key: controller.formKey,
child: SomeWidgetWithFormFields(),
)sliver: SliverToBoxAdapter(
child: Form(
key: controller.formKey,
child: SomeWidgetWithFormFields(),
)
)Official migration guide (excerpt, © The Flutter Authors, CC BY 3.0)
If your app does not currently use the Form widget directly as a sliver within a scrollable list (e.g., as a direct child of CustomScrollView's slivers property), then no changes are required.
If your app use Form as a sliver, you will need to wrap the Form widget within a SliverToBoxAdapter. SliverToBoxAdapter is a sliver that contains a single box widget, converting a regular widget into a sliver that can be placed in a CustomScrollView.
Code before migration:
sliver: Form(
key: controller.formKey,
child: SomeWidgetWithFormFields(),
)Code after migration:
sliver: SliverToBoxAdapter(
child: Form(
key: controller.formKey,
child: SomeWidgetWithFormFields(),
)
)AI_PROVIDER (for example to openai-compatible with a local Ollama or LM Studio endpoint) to enable grounded explanations. Everything else on this page works without an AI provider.Listed in the official breaking-changes index (docs.flutter.dev/release/breaking-changes).
An official announcement or migration guide documents an intended behaviour or API change. A verified source change (git diff) shows code changed but does not by itself prove a public API is breaking. AI interpretations are labelled and never used to classify a change.
- Source commit
- b3045439b7c0
- Source last updated
- Oct 21, 2026
- Last synchronized
- Oct 21, 2026
- Publication status
- published
Publication history
- Oct 21, 2026, 8:31 PM: new → published (ingestion) — Backed by an official breaking-change/migration guide.
AI_PROVIDER (for example to openai-compatible with a local Ollama or LM Studio endpoint) to enable grounded explanations. Everything else on this page works without an AI provider.