Skip to content

Add other WidgetStates To CupertinoButton #165369

@srivats22

Description

@srivats22

As part of #164196, MouseCursor was introduced as a parameter to the Cupertino button. The current implementation was limited to tracking whether the state was disabled or not.

With this issue, the scope will be extended to track other states such as pressed, focused, enabled, and other applicable states.

Placing starter code just to get some initial feedback

final Set<WidgetState> states = <WidgetState>{
      if (!enabled) WidgetState.disabled,
      if (widget.onPressed != null || widget.onLongPress != null) WidgetState.pressed,
      if (isFocused) WidgetState.focused
};

cc @victorsanni @dkwingsmt
please assign this to me I will work on it

Metadata

Metadata

Assignees

Labels

c: 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.r: fixedIssue is closed as already fixed in a newer versionteam-designOwned by Design Languages team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions