Create CupertinoRadio Widget#123296
Conversation
gspencergoog
left a comment
There was a problem hiding this comment.
Both of the examples will need tests. See some of the other tests under examples/api/test to see how they're written. They're pretty simple tests just to make sure that the example displays the expected components of the example.
There was a problem hiding this comment.
You should give this a more specific name: (e.g. 'CuptertinoRadio Example').
There was a problem hiding this comment.
Try naming the app something like "CupertinoRadioApp" or something to make it match the example.
There was a problem hiding this comment.
| // Flutter code sample for [CupertinoRadio]. | |
| /// Flutter code sample for [CupertinoRadio]. |
This should be a doc comment so that IDE users can click on the link to get back to the class the example is attached to.
You might need to move this below the import if the analyzer complains.
There was a problem hiding this comment.
You can probably get rid of this. The title is not really used on iOS, I don't think. On Android it's used when you pull down the window shade, but that's all.
There was a problem hiding this comment.
Name this something specific to this example: CupertinoRadioExample or something.
There was a problem hiding this comment.
| /// radio button with the new [groupValue]. | |
| /// radio button with a new [groupValue]. |
There was a problem hiding this comment.
| /// ** See code in examples/api/lib/cupertino/radio/radio.toggleable.0.dart ** | |
| /// ** See code in examples/api/lib/cupertino/radio/cupertino_radio.toggleable.0.dart ** |
There was a problem hiding this comment.
Is it really a "shadow"? I think I'd call it just a border.
There was a problem hiding this comment.
You might move this to a named constant at the top of the file.
29f8af3 to
783cf86
Compare
783cf86 to
815fbe3
Compare
Create CupertinoRadio Widget

Addresses #102813. Adds a radio widget to Cupertino. Like the checkbox, this will be made adaptable with the Material radio widget.
Here's the radio buttons in the macOS settings:

And here's the Cupertino version in action, including keyboard focus/ interaction:
Screen.Recording.2023-03-22.at.3.49.57.PM.mov
Pre-launch Checklist
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.