MarcinusX / NumberPicker

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Problems updating the current value with Provider

von-maurus opened this issue · comments

The value of currentValue or in that case "cantidadProducto" is not changing when scrolling down or up. What happens is that it returns to the initial value or current value.

This is the implementation of the numberpicker with Provider:

image

Method to update the current value:
image
void updateNumberSelector(int cantidad) { cantidadProducto = cantidad; notifyListeners(); }

You have hardcoded the value to 1, in your case change it to cantidadProducto.