Skip to content

Conversation

@MKMalik
Copy link

@MKMalik MKMalik commented Oct 19, 2025

PR Description

This PR addresses several issues in the _Dial duration picker:

Immediate dial response

  • Dial now responds immediately when dragging from any position, not just after 3 o’clock (15 mins).
  • Removed outdated quadrant guards that caused delayed updates.

Prevent negative duration

  • Dragging near 12 o’clock no longer produces negative values.
  • _updateThetaForPan() now clamps the angle to zero if the resulting duration would be negative.

Null-safety compliance

  • _position and _center are now safely handled as nullable.
  • Guards added to prevent null-pointer exceptions on pan start/update.

Android v1 embedding compatibility

  • Ensured gestures and animations behave correctly on older Android v1 embedding.
  • Fixed any platform-specific issues with RenderBox offsets.

Flutter-specific adjustments

  • _thetaTween and _thetaController animation updates now respect null-safety.
  • Smooth transitions across 12 o’clock are preserved.
  • Simplified angle calculation using consistent atan2 logic.

@MKMalik
Copy link
Author

MKMalik commented Nov 14, 2025

those in need can use this repo until it's merged
https://github.com/MKMalik/flutter_duration_picker.git

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant