cdharris / flutter_duration_picker

A Flutter Widget for allowing a user to pick a duration (e.g. 5mins, 1h 30mins, etc)
MIT License
78 stars 49 forks source link

[FEAT] - Allow HapticFeedback on value change #27

Open royston-c opened 3 years ago

royston-c commented 3 years ago

It would be great if this library could provide feedback to the user on scroll via the HapticFeedback API. Options for enabling this as I see it:

  1. have an enableHapticFeedback: bool in the settings which calls HapticFeedback.selectionClick() in the _handleTimeChanged method of _DurationPickerDialogState

  2. provide a callback to the consumer on calls to the _handleTimeChanged method of _DurationPickerDialogState

I personally prefer option 2. It's a bit more generic.