You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[cupertino_ui] NoDefaultCupertinoThemeData == and hashCode ignore selectionHandleColor #195391
const red =NoDefaultCupertinoThemeData(selectionHandleColor:CupertinoColors.systemRed);
const blue =NoDefaultCupertinoThemeData(selectionHandleColor:CupertinoColors.systemBlue);
print(red == blue); // true
Expected results
false. The two themes have different selection handle colors. CupertinoThemeData already compares and hashes selectionHandleColor.
Actual results
true, because NoDefaultCupertinoThemeData.operator == and hashCode leave out selectionHandleColor.
Material's ThemeData.cupertinoOverrideTheme is typed NoDefaultCupertinoThemeData?, and ThemeData == compares it. So an app that passes a NoDefaultCupertinoThemeData there and changes only its selectionHandleColor produces a ThemeData that compares equal to the old one, and widgets that depend on the theme aren't rebuilt with the new handle color. (Passing a CupertinoThemeData isn't affected, since it overrides ==.)
Activity
saurabh-mirajkar commentedon Oct 27, 2026
@ChandraChaan Thanks for the report. Labelling for
team-designto investigate further.[cupertino_ui] Include selectionHandleColor in NoDefaultCupertinoThem…