Skip to content

Deprecate 10 ThemeData properties - #12617

Draft
guidezpl wants to merge 4 commits into
mainfrom
themedata-deprecations
Draft

guidezpl wants to merge 4 commits into
mainfrom
themedata-deprecations

Conversation

@guidezpl

@guidezpl guidezpl commented Aug 25, 2026 •

Copy link
Copy Markdown
Member

Deprecates another slate of ThemeData properties we've been wanting to clean up for a while. Some are M1, others are no longer in spec, or others have more appropriate theme-based equivalent.

Part of flutter/flutter#91772

Pre-Review Checklist

If you need help, consider asking for advice on the #hackers-new channel on Discord.

Note: The Flutter team is currently trialing the use of Gemini Code Assist for GitHub. Comments from the gemini-code-assist bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.

Footnotes

  1. Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling. ↩ ↩2

@guidezpl

guidezpl commented Aug 25, 2026 •

Copy link
Copy Markdown
Member Author

@QuncCccccc would appreciate your review on this. Open questions before further work:

  1. Is the breaking change and major version bump made at property deprecation or property removal?
  2. Are internal (to material_ui) usages migrated with this PR, or in a PR in between property deprecation and removal?
  3. Looking at the deprecation warnings, suggested replacements, and expected dart fixes, do the theme introductions (or lack thereof) and the automatic replacements seem reasonable to you?
    • espcially this one: ThemeData.cardColor (13) ⇒ ColorScheme.surfaceContainer or CardThemeData.color

@github-actions github-actions Bot added p: material_ui triage-design Should be looked at in design triage labels Aug 25, 2026

@QuncCccccc QuncCccccc left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for the help! I'll take another round of review tomorrow:)!

)
Color? dividerColor,
@Deprecated(
'Use InputDecorationTheme.hintStyle.color or InputDecoration.hintStyle.color instead. '

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or ColorScheme.onSurfaceVariant?

@guidezpl guidezpl Aug 26, 2026 •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given how hintColor is used internally, this feels to me more like a theme property introduction and replacement, than a ColorScheme usage. Do you agree or what's the reasoning?

)
Color? primaryColor,
@Deprecated(
'Consider using a ThemeExtension instead. This feature was deprecated after material_ui v1.1.0.',

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we can also add "or use dark ColorScheme.primary"

@guidezpl guidezpl Aug 26, 2026 •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since primaryColorDark and primaryColorLight were meant to be tonally darker and lighter versions of the primary color, I don't think there's a replacement in m3 world. Even a dark ColorScheme .primary wouldn't be equivalent. So I don't think there's a better suggestion

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

p: material_ui triage-design Should be looked at in design triage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants