Closed stubborncoder closed 6 years ago
Thanks for the bug report and appreciate the screenshot too, nice styling.
Will try and get to this in a few days.
Hello I tried to open a pull request but I don't have access, I think this little fix would be enough:
class _DialState extends State<_Dial> with SingleTickerProviderStateMixin {
@override
void initState() {
super.initState();
_thetaController = new AnimationController(
duration: _kDialAnimateDuration,
vsync: this,
);
// Fix for the default initial duration when it's longer than 60 minutes. INIT
_hours = _getInitialHours(widget.duration);
// Fix for the default initial duration when it's longer than 60 minutes. END
_thetaTween =
new Tween<double>(begin: _getThetaForDuration(widget.duration));
_theta = _thetaTween.animate(new CurvedAnimation(
parent: _thetaController, curve: Curves.fastOutSlowIn))
..addListener(() => setState(() {}));
}....
int _getInitialHours (Duration duration){
return duration.inHours.floor();
}
Thanks for the awesome plugin!
Added PR with a fix - it looks good to me now :) Please let us know if you can push a new version as a package.
Many thanks for the PR, looks good to me! New version tagged and push to pub. @solid-software
@cdharris thanks! Looks great on my end - just updated from pub :smiley: I think we can close this one.
Hello, thanks for this wonderfull widget, it seems that when you set the default duration with more than 60 minutes it always defaults to 30 although the real value is correct and returns 90 minutes.