Skip to content
Boring Doc
RemovedHigh impactOfficial migration guidesince 3.27.0landed 3.24.0-0.1.pre

Remove invalid parameters for InputDecoration.collapsed

Framework · Official source

`InputDecoration.collapsed` invalid parameters `floatingLabelBehavior` and `floatingLabelAlignment` are deprecated.

Who is affected
Any code still referencing the removed API will fail to compile after upgrading. Code that uses InputDecoration.collapsed, InputDecoration.floatingLabelAlignment, InputDecoration.floatingLabelBehavior.
Practical impact
Compile errors until migrated; must be addressed before upgrading.
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)

dart+0−2
Before
1 InputDecoration.collapsed(
2 hintText: 'Hint',
3− floatingLabelAlignment: FloatingLabelAlignment.center,
4− floatingLabelBehavior: FloatingLabelBehavior.auto,
5 ),
After
1 InputDecoration.collapsed(
2 hintText: 'Hint',
 
 
3 ),
Raw before / after
InputDecoration.collapsed(
  hintText: 'Hint',
  floatingLabelAlignment: FloatingLabelAlignment.center,
  floatingLabelBehavior: FloatingLabelBehavior.auto,
),
InputDecoration.collapsed(
  hintText: 'Hint',
),
Official migration guide (excerpt, © The Flutter Authors, CC BY 3.0)

To migrate, remove usage of floatingLabelBehavior and floatingLabelAlignment parameters when calling the InputDecoration.collapsed constructor. Those parameters had no effect.

Code before migration:

InputDecoration.collapsed(
  hintText: 'Hint',
  floatingLabelAlignment: FloatingLabelAlignment.center,
  floatingLabelBehavior: FloatingLabelBehavior.auto,
),

Code after migration:

InputDecoration.collapsed(
  hintText: 'Hint',
),
Migration assistantAI-generated · grounded in cited sources
AI explanations are not configured
Set 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.
Official migration guide·Verified classification (90%)

Listed in the official breaking-changes index; title states removal.

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 explanationAI-generated · grounded in cited sources
AI explanations are not configured
Set 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.
Was this useful?