Skip to content
Boring Doc
DeprecatedMedium impactOfficial migration guidesince 3.32.0landed 3.30.0-0.0.pre

Deprecate ThemeData.indicatorColor in favor of TabBarThemeData.indicatorColor

Framework · Official source

The `ThemeData.indicatorColor` parameter was deprecated in favor of the `TabBarThemeData.indicatorColor` parameter.

Original behavior

The defaults for the `TabBar` widget can be overridden with a component-specific theme like `TabBarThemeData`. Previously, the `ThemeData.indicatorColor` parameter was used to override the default tab bar indicator color in Material Design 2, which was made redundant by `TabBarThemeData`.

New behavior

The `ThemeData.indicatorColor` is deprecated in favor of a component-specific theme. Use `TabBarThemeData` to override the default indicator color.

Who is affected
Code that still calls the deprecated API; it keeps working until removal but produces analyzer warnings. Code that uses ThemeData.indicatorColor, TabBarThemeData.indicatorColor, TabBar and related APIs.
Practical impact
Warnings now; removal in a future release. Plan the migration but no immediate break.
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+1−1
Before
1 theme: ThemeData(
2− indicatorColor: Colors.red,
3 useMaterial3: false,
4 ),
After
1 theme: ThemeData(
2+ tabBarTheme: const TabBarThemeData(indicatorColor: Colors.red),
3 useMaterial3: false,
4 ),
Raw before / after
theme: ThemeData(
  indicatorColor: Colors.red,
  useMaterial3: false,
),
theme: ThemeData(
  tabBarTheme: const TabBarThemeData(indicatorColor: Colors.red),
  useMaterial3: false,
),
Official migration guide (excerpt, © The Flutter Authors, CC BY 3.0)

Replace [ThemeData.indicatorColor][] with [TabBarThemeData.indicatorColor][] to override the default tab bar indicator color when [ThemeData.useMaterial3][] flag is set to false.

Code before migration:

theme: ThemeData(
  indicatorColor: Colors.red,
  useMaterial3: false,
),

Code after migration:

theme: ThemeData(
  tabBarTheme: const TabBarThemeData(indicatorColor: Colors.red),
  useMaterial3: false,
),
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 deprecation.

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?