Skip to content

Include misspelledSelectionColor in SpellCheckConfiguration equality - #195404

Open
ChandraChaan wants to merge 4 commits into
flutter:masterfrom
ChandraChaan:spellcheck-config-equality
Open

ChandraChaan wants to merge 4 commits into
flutter:masterfrom
ChandraChaan:spellcheck-config-equality

Conversation

@ChandraChaan

Copy link
Copy Markdown

SpellCheckConfiguration.operator == and hashCode leave out misspelledSelectionColor, so configurations that differ only in that color compare equal. Because EditableTextState.didUpdateWidget re-infers its spell check configuration only when the old and new configurations are unequal, changing just misspelledSelectionColor has no effect until something else changes.

This adds the field to both, and adds tests for the equality and for EditableText picking up the new color. Both tests fail without the fix.

Fixes #195403

Pre-launch Checklist

@github-actions github-actions Bot added the framework flutter/packages/flutter repository. See also f: labels. label Oct 27, 2026
@ChandraChaan
ChandraChaan marked this pull request as ready for review October 27, 2026 14:40

@gemini-code-assist gemini-code-assist Bot 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.

Code Review

This pull request adds misspelledSelectionColor to the equality operator and hashCode of SpellCheckConfiguration. It also introduces unit and widget tests to verify the equality logic and ensure EditableText updates when misspelledSelectionColor changes. There are no review comments, and I have no feedback to provide.

@justinmc
justinmc requested review from chunhtai and justinmc October 27, 2026 22:46
@ChandraChaan

Copy link
Copy Markdown
Author

Hi @justinmc and @chunhtai, a gentle ping on this one when you have time. It is a small change: it adds misspelledSelectionColor to SpellCheckConfiguration's == and hashCode, with tests. I have just merged master in so it is up to date.

@chunhtai chunhtai 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.

LGTM

@ChandraChaan

Copy link
Copy Markdown
Author

Thank you for the review, @chunhtai! I have merged master in so the presubmits run against current code. Could you add the CICD label when you have a moment so they can start?

@ChandraChaan

Copy link
Copy Markdown
Author

Thanks for the review, @chunhtai! Could you or another maintainer add the CICD label so the presubmits can run? Thanks!

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

Labels

framework flutter/packages/flutter repository. See also f: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SpellCheckConfiguration == and hashCode ignore misspelledSelectionColor

2 participants