When using the InputQty widget, manual input into the text field allows values beyond minVal and maxVal without immediate correction. Although checkValue() is called on submit or blur, users can still leave the value invalid while typing.
💡 Suggested Fix:
- Add a debounce listener in
onChanged to call checkValue() after short delay (e.g. 300ms), so the field auto-corrects on idle input.
✅ Benefits:
- Smoother UX
- Prevents invalid state in form data
- Ensures
onQtyChanged always delivers valid value
✅ Tested Fix (sample):
Timer? _debounce;
onChanged: (strVal) {
...
_debounce?.cancel();
_debounce = Timer(Duration(milliseconds: 300), checkValue);
}
When using the
InputQtywidget, manual input into the text field allows values beyondminValandmaxValwithout immediate correction. AlthoughcheckValue()is called on submit or blur, users can still leave the value invalid while typing.💡 Suggested Fix:
onChangedto callcheckValue()after short delay (e.g. 300ms), so the field auto-corrects on idle input.✅ Benefits:
onQtyChangedalways delivers valid value✅ Tested Fix (sample):