Chris1234567899 / flutter_time_range_picker

A time range picker for Flutter
MIT License
33 stars 53 forks source link

Improved selection of touch handle for start or end point #47

Open arjanmels opened 1 year ago

arjanmels commented 1 year ago

Select the start or endpoint whichever is closer to the touchpoint. This prevent jumps when start and endpoint are overlapping, because the endpoint would be selected preferentially and if the touchpoint was before the startpoint, end and startpoint would get swapped.

arjanmels commented 1 year ago

Added improvement to pushing of start/end time. When the minDuration was short and dragging fast, the touchpoint could overtake the other (non-touched) handle leading to a jump form minDuration to maxDuration.

Also cleaned up to use normalizeAngle everywhere.

arjanmels commented 1 year ago

Fixed problem when abs(start-end)>180 with previous commit.