[Breaking Change] CupertinoTimerPicker fidelity changes

Skip to first unread message

Weiyu Huang

Aug 23, 2019, 4:31:38 PM8/23/19
to Flutter Public Announcements (flutter-announce)
 I'd like to propose making a few fidelity changes to CupertinoTimerPicker: In https://github.com/flutter/flutter/pull/38481

  •  The text labels ("hours"/"min."/"sec.") should respect CupertinoTextTheme.pickerTextStyle
  •  The minute picker and second picker should loop. That is, when scrolled beyond 0 or 59, the picker should remain scrollable in the current direction and the next number should be 59 or 0, respectively.
  •  The hour/minute/second labels should only change when the scrolling stops
  •  The separator/divider lines should not spread out to reach the horizontal (left and right) edges of the widget. And CupertinoTimerPicker should have a fixed size in each mode.
  •  CupertinoTimerPicker should use fixed font sizes for its number labels and text labels.
  •  The hour/minute/second labels should be baseline aligned with their corresponding number labels

Screenshot of the new CupertinoTimerPicker



Currently only the number labels respect CupertinoTextTheme.pickerTextStyle. If you're using a DefaultTextStyle widget to customize the text style of the hour/minute/second labels of CupertinoTimerPicker,
with the changes from https://github.com/flutter/flutter/pull/38481, DefaultTextStyle will be ignored by CupertinoTimerPicker and it will pick up the text style configuration from CupertinoTextTheme.pickerTextStyle instead,
to make the number and the text labels look consistent. 

The other changes in the pull request are aiming to adjust the feel and look of CupertinoTimerPicker to better match the native component, so hopefully no code changes or only trivial changes would be required.

if you have any concerns regarding the proposed changes, please leave a comment in the PR: https://github.com/flutter/flutter/pull/38481, or contact me directly. Thank you!

Reply all
Reply to author
0 new messages