In accordance with Flutter's Deprecation Policy, deprecated APIs that reached end of life after the 2.2 stable release have been removed.
- Who is affected
- Any code still referencing the removed API will fail to compile after upgrading. Code that uses InputDecoration, InputDecorationTheme, FloatingLabelBehavior.auto and related APIs.
- Practical impact
- Compile errors until migrated; must be addressed before upgrading.
- What action should I take?
- Review the linked source, update affected code and run your test suite before upgrading.
Before and after (from the official guide)
dart+10−10
Before
| 1 | // InputDecoration | |
| 2 | // Base constructor | |
| 3 | − | InputDecoration(hasFloatingPlaceholder: true); |
| 4 | − | InputDecoration(hasFloatingPlaceholder: false); |
| 5 | ||
| 6 | // collapsed constructor | |
| 7 | − | InputDecoration.collapsed(hasFloatingPlaceholder: true); |
| 8 | − | InputDecoration.collapsed(hasFloatingPlaceholder: false); |
| 9 | ||
| 10 | // Field access | |
| 11 | − | inputDecoration.hasFloatingPlaceholder; |
| 12 | ||
| 13 | // InputDecorationTheme | |
| 14 | // Base constructor | |
| 15 | − | InputDecorationTheme(hasFloatingPlaceholder: true); |
| 16 | − | InputDecorationTheme(hasFloatingPlaceholder: false); |
| 17 | ||
| 18 | // Field access | |
| 19 | − | inputDecorationTheme.hasFloatingPlaceholder; |
| 20 | ||
| 21 | // copyWith | |
| 22 | − | inputDecorationTheme.copyWith(hasFloatingPlaceholder: false); |
| 23 | − | inputDecorationTheme.copyWith(hasFloatingPlaceholder: true); |
After
| 1 | // InputDecoration | |
| 2 | // Base constructor | |
| 3 | + | InputDecoration(floatingLabelBehavior: FloatingLabelBehavior.auto); |
| 4 | + | InputDecoration(floatingLabelBehavior: FloatingLabelBehavior.never); |
| 5 | ||
| 6 | // collapsed constructor | |
| 7 | + | InputDecoration.collapsed(floatingLabelBehavior: FloatingLabelBehavior.auto); |
| 8 | + | InputDecoration.collapsed(floatingLabelBehavior: FloatingLabelBehavior.never); |
| 9 | ||
| 10 | // Field access | |
| 11 | + | inputDecoration.floatingLabelBehavior; |
| 12 | ||
| 13 | // InputDecorationTheme | |
| 14 | // Base constructor | |
| 15 | + | InputDecorationTheme(floatingLabelBehavior: FloatingLabelBehavior.auto); |
| 16 | + | InputDecorationTheme(floatingLabelBehavior: FloatingLabelBehavior.never); |
| 17 | ||
| 18 | // Field access | |
| 19 | + | inputDecorationTheme.floatingLabelBehavior; |
| 20 | ||
| 21 | // copyWith | |
| 22 | + | inputDecorationTheme.copyWith(floatingLabelBehavior: FloatingLabelBehavior.never); |
| 23 | + | inputDecorationTheme.copyWith(floatingLabelBehavior: FloatingLabelBehavior.auto); |
Raw before / after
// InputDecoration // Base constructor InputDecoration(hasFloatingPlaceholder: true); InputDecoration(hasFloatingPlaceholder: false); // collapsed constructor InputDecoration.collapsed(hasFloatingPlaceholder: true); InputDecoration.collapsed(hasFloatingPlaceholder: false); // Field access inputDecoration.hasFloatingPlaceholder; // InputDecorationTheme // Base constructor InputDecorationTheme(hasFloatingPlaceholder: true); InputDecorationTheme(hasFloatingPlaceholder: false); // Field access inputDecorationTheme.hasFloatingPlaceholder; // copyWith inputDecorationTheme.copyWith(hasFloatingPlaceholder: false); inputDecorationTheme.copyWith(hasFloatingPlaceholder: true);
// InputDecoration // Base constructor InputDecoration(floatingLabelBehavior: FloatingLabelBehavior.auto); InputDecoration(floatingLabelBehavior: FloatingLabelBehavior.never); // collapsed constructor InputDecoration.collapsed(floatingLabelBehavior: FloatingLabelBehavior.auto); InputDecoration.collapsed(floatingLabelBehavior: FloatingLabelBehavior.never); // Field access inputDecoration.floatingLabelBehavior; // InputDecorationTheme // Base constructor InputDecorationTheme(floatingLabelBehavior: FloatingLabelBehavior.auto); InputDecorationTheme(floatingLabelBehavior: FloatingLabelBehavior.never); // Field access inputDecorationTheme.floatingLabelBehavior; // copyWith inputDecorationTheme.copyWith(floatingLabelBehavior: FloatingLabelBehavior.never); inputDecorationTheme.copyWith(floatingLabelBehavior: FloatingLabelBehavior.auto);
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.
Validation warnings
api-symbols: {"reason":"no referenced symbol found in the current API index","unresolved":["InputDecoration","InputDecorationTheme","FloatingLabelBehavior.auto","FloatingLabelBehavior.never","FloatingLabelBehavior.always","FloatingLabelBehavior","TextTheme","TextStyle","Typography"]}
- 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?