In accordance with Flutter's Deprecation Policy, deprecated APIs that reached end of life after the 3.16 stable release have been removed.
- Who is affected
- Any code still referencing the removed API will fail to compile after upgrading. Code that uses TextButton, ElevatedButton, OutlinedButton 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+7−7
Before
| 1 | TextButton.styleFrom( | |
| 2 | − | primary: Colors.red, |
| 3 | − | onSurface: Colors.black, |
| 4 | ); | |
| 5 | ElevatedButton.styleFrom( | |
| 6 | − | primary: Colors.red, |
| 7 | − | onPrimary: Colors.blue, |
| 8 | − | onSurface: Colors.black, |
| 9 | ); | |
| 10 | OutlinedButton.styleFrom( | |
| 11 | − | primary: Colors.red, |
| 12 | − | onSurface: Colors.black, |
| 13 | ); |
After
| 1 | TextButton.styleFrom( | |
| 2 | + | foregroundColor: Colors.red, |
| 3 | + | disabledForegroundColor: Colors.black, |
| 4 | ); | |
| 5 | ElevatedButton.styleFrom( | |
| 6 | + | backgroundColor: Colors.red, |
| 7 | + | foregroundColor: Colors.blue, |
| 8 | + | disabledForegroundColor: Colors.black, |
| 9 | ); | |
| 10 | OutlinedButton.styleFrom( | |
| 11 | + | foregroundColor: Colors.red, |
| 12 | + | disabledForegroundColor: Colors.black, |
| 13 | ); |
Raw before / after
TextButton.styleFrom( primary: Colors.red, onSurface: Colors.black, ); ElevatedButton.styleFrom( primary: Colors.red, onPrimary: Colors.blue, onSurface: Colors.black, ); OutlinedButton.styleFrom( primary: Colors.red, onSurface: Colors.black, );
TextButton.styleFrom( foregroundColor: Colors.red, disabledForegroundColor: Colors.black, ); ElevatedButton.styleFrom( backgroundColor: Colors.red, foregroundColor: Colors.blue, disabledForegroundColor: Colors.black, ); OutlinedButton.styleFrom( foregroundColor: Colors.red, disabledForegroundColor: Colors.black, );
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":["TextButton","ElevatedButton","OutlinedButton","ButtonStyle","TextButton.styleFrom","ElevatedButton.styleFrom","OutlinedButton.styleFrom","ThemeData","NavigatorState","FocusScopeNode","Navigator","FocusScope","WidgetsApp","FocusNode","FocusNode.enclosingScope","PlatformMenuBar","TextTheme","WidgetInspectorService","WidgetInspectorServiceExtensions"]}
- 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?