Skip to content

Fix: Android v1 compatibility issues, Dial responsiveness, negative duration, and null-safety issues#36

Open
MKMalik wants to merge 2 commits into
cdharris:masterfrom
MKMalik:master
Open

Fix: Android v1 compatibility issues, Dial responsiveness, negative duration, and null-safety issues#36
MKMalik wants to merge 2 commits into
cdharris:masterfrom
MKMalik:master

Conversation

@MKMalik

@MKMalik MKMalik commented Oct 19, 2025

Copy link
Copy Markdown

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

MKMalik commented Nov 14, 2025

Copy link
Copy Markdown
Author

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