Skip to content

[Bug] InputQty allows out-of-range manual input (should auto-correct <min / >max) #73

@lukaskris

Description

@lukaskris

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);
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions