Skip to content

[cupertino_ui] NoDefaultCupertinoThemeData == and hashCode ignore selectionHandleColor #195391

Closed
flutter/packages
#13450

Description

@ChandraChaan

Steps to reproduce

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 ==.)

Package version

cupertino_ui 1.1.4 (main as of today)

Activity

  1. saurabh-mirajkar commented on Oct 27, 2026

    @saurabh-mirajkar
    Contributor

    @ChandraChaan Thanks for the report. Labelling for team-design to investigate further.

  2. added
    p: cupertino_uicupertino_ui package in flutter/packages
    packageflutter/packages repository. See also p: labels.
    team-designOwned by Design Languages team
    and removed
    in triagePresently being triaged by the triage team
    on Oct 27, 2026
  3. added
    P2Important issues not at the top of the work list
    triaged-designTriaged by Design Languages team
    on Oct 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work listp: cupertino_uicupertino_ui package in flutter/packagespackageflutter/packages repository. See also p: labels.team-designOwned by Design Languages teamtriaged-designTriaged by Design Languages team

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions