Skip to content

Bring CupertinoSwitch up to speed with Switch.adaptive #149275

@victorsanni

Description

@victorsanni

Use case

There are two independent iOS-style switch implementations: Switch.adaptive and CupertinoSwitch.

CupertinoSwitch should support some functionality that Switch has, such as:

  • Ability to customize mouse cursors.
  • Ability to customize track outline color and width.
  • Ability to customize thumb color in both active and inactive states.
  • Ability to show an image/icon on the thumb.
  • Ability to resolve properties in different WidgetStates.

Most of these capabilities are already provided via Switch.adaptive on iOS/macOS. However, CupertinoSwitch should also provide these capabilities. This is also an opportunity to bring the Switch and CupertinoSwitch APIs closer together.

Proposal

Part 1

Add these capabilities to CupertinoSwitch.

Part 2

Also, a decision should be made about having Switch.adaptive delegate to CupertinoSwitch so that there are not two independent iOS-style Switch implementations.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1High-priority issues at the top of the work lista: fidelityMatching the OEM platforms betterc: new featureNothing broken; request for a new capabilityc: proposalA detailed proposal for a change to Flutterf: cupertinoflutter/packages/flutter/cupertino repositoryframeworkflutter/packages/flutter repository. See also f: labels.team-designOwned by Design Languages teamtriaged-designTriaged by Design Languages team

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions