Skip to content

Conversation

@TahaTesser
Copy link
Member

@TahaTesser TahaTesser commented Nov 14, 2021

This adds an official CupertinoPicker example, this makes it much easier to try Cupertino picker.

Preview

Screen.Recording.2021-11-14.at.20.06.54.mov

Related #72926

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
  • I signed the CLA.
  • I listed at least one issue that this PR fixes in the description above.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or this PR is test-exempt.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@flutter-dashboard flutter-dashboard bot added d: api docs Issues with https://api.flutter.dev/ d: examples Sample code and demos documentation f: cupertino flutter/packages/flutter/cupertino repository framework flutter/packages/flutter repository. See also f: labels. c: contributor-productivity Team-specific productivity, code health, technical debt. labels Nov 14, 2021
@flutter-dashboard
Copy link

It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat.

If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix?

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

@TahaTesser
Copy link
Member Author

@gspencergoog
Added test and cleaned up
Thank you so much for the review!

Copy link
Contributor

@gspencergoog gspencergoog left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As with the other PRs, it would be good to add comments to the example code itself.

@TahaTesser
Copy link
Member Author

TahaTesser commented Feb 2, 2022

@gspencergoog
Added comments, renamed class, and provided custom parameters
Also, I thought the example could use little color so I added emojis in the fruit strings

Screen.Recording.2022-02-03.at.01.15.24.mov

Copy link
Contributor

@gspencergoog gspencergoog left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

32384589-a60f0e74-c078-11e7-9bc1-e5b5287aea9d

Thanks, this looks great!

remove trailing space

test

Update example

fixes

Make example little colorful

Rename class

Kick tests
@fluttergithubbot fluttergithubbot merged commit ee0bbf4 into flutter:master Feb 15, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 15, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Feb 15, 2022
@TahaTesser TahaTesser deleted the cupertino_picker_example branch February 15, 2022 14:29
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 15, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Feb 15, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 15, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Feb 15, 2022
@TahaTesser
Copy link
Member Author

Hey @gspencergoog
Can you please take a look https://master-api.flutter.dev/flutter/cupertino/CupertinoPicker-class.html?
Is it only master docs or this is how the emojis would be in the example.
If emojis won't work then I could file a PR to remove those emojis.

@gspencergoog
Copy link
Contributor

Oooh, Yes, @TahaTesser I forgot that the web font that DartPad provides doesn't have Emojis. I guess they'll just have to be removed.

@gspencergoog
Copy link
Contributor

It also looks like there's a bug in the picker that doesn't allow clicking on the item itself to set it, only clicking away from the chooser selects the item. This might only happen on web.

@TahaTesser
Copy link
Member Author

TahaTesser commented Feb 15, 2022

It also looks like there's a bug in the picker that doesn't allow clicking on the item itself to set it, only clicking away from the chooser selects the item. This might only happen on web.

If I understand correctly, you're trying to tap on an item, expect to scroll to it and set it as the picked item. This is actually a ListWheelScrollView limitation, which I used by CupertinoPicker #38803

@TahaTesser TahaTesser mentioned this pull request Feb 15, 2022
8 tasks
@gspencergoog
Copy link
Contributor

Huh, seems counterintuitive, but if that's intended behavior, then OK.

clocksmith pushed a commit to clocksmith/flutter that referenced this pull request Mar 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c: contributor-productivity Team-specific productivity, code health, technical debt. d: api docs Issues with https://api.flutter.dev/ d: examples Sample code and demos f: cupertino flutter/packages/flutter/cupertino repository framework flutter/packages/flutter repository. See also f: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants