Skip to content

CupertinoSwitch is missing focusNode, onFocusChange and autofocus #126679

@TahaTesser

Description

@TahaTesser

Is there an existing issue for this?

Steps to reproduce

Control cupertino widgets like CupertinoCheckbox and CupertinoRadio have focusNode and autofocus, while these are missing in CupertinoSwitch.

https://master-api.flutter.dev/flutter/cupertino/CupertinoCheckbox/CupertinoCheckbox.html
https://master-api.flutter.dev/flutter/cupertino/CupertinoRadio/CupertinoRadio.html

This is blocking #126637 (switch.dart currently maintains its focus node for CupertinoSwitch when using Switch.adaptive which causes a bug)

Expected results

CupertinoSwitch has focusNode, onFocusChange and autofocus

Actual results

CupertinoSwitch doesn't have focusNode, onFocusChange and autofocus

Code sample

Code sample
[Paste your code here]

Screenshots or Video

Screenshots / Video demonstration

[Upload media here]

Logs

Logs
[Paste your logs here]

Flutter Doctor output

Doctor output
[Paste your output here]

Metadata

Metadata

Assignees

Labels

f: cupertinoflutter/packages/flutter/cupertino repositoryf: focusFocus traversal, gaining or losing focusframeworkflutter/packages/flutter repository. See also f: labels.

Type

No type

Projects

Status

Done (PR merged)

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions