-
Notifications
You must be signed in to change notification settings - Fork 142
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
Values doesn't match between picker and onchanged #77
Comments
Hello, maybe because you are creating everytime a new decimalPicker when you call setState() in your build() tree. Here:
Try to implement directly in the Wrap widget. |
Ive find the same problem. Future<int> pickBadgeCount(BuildContext context) async {
int amount ;
AlertDialog alert = AlertDialog(
title: Text("Choose the new badge amount"),
content: NumberPicker.integer(
initialValue: 50,
minValue: 0,
maxValue: 999,
onChanged: (newValue) => amount = newValue
),
actions: [
FlatButton(
child: Text("Cancel"),
onPressed: (){
amount = null;
Navigator.of(context).pop();
},
),
FlatButton(
child: Text("OK"),
onPressed: () {
Navigator.of(context).pop();
},
),
],
);
// show the dialog
await showDialog(
context: context,
builder: (BuildContext context) => alert
);
return amount;
} |
Is it still a problem? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
That's my code snippet. When I change the value due scrolling, the first number does only the change and when i use the decimal Value it alway jumps back to the inital value( first digit).
` NumberPicker.decimal(
The text was updated successfully, but these errors were encountered: