New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Decimal picker crashes when trying to change decimal point #16
Comments
Yeah, I think that |
Replacing line 272 (_onDecimalNotification()) with
fixes it... |
Hey, thanks for submitting this! |
Fixed |
Published version 0.1.4 with the fix. |
My picker:
return new NumberPickerDialog.decimal( minValue: 37, maxValue: 42, initialDoubleValue: 37.5, );
I did some debugging, looks like in
_onDecimalNotification(Notification notification)
thedecimalValueInTheMiddle
is too big (37 in my case). Upon closer looking I am actually confused what the purpose of that variable is.The relevant problem happens towards the end:
double newValue = ((selectedIntValue + decimalPart).toDouble());
The decimal part in my case is 3.7 (gets formed from the 37 I mentioned above). If I understand that correctly, the decimal part should be between 0(inclusive) and 1(exclusive).
In my case the newValue becomes too big at some point which is why the number picker craps out with an assertion error from the constructor (min max selected check)
Exception:
The text was updated successfully, but these errors were encountered: