Flutter widget for quantity input. Increase or decrease the input value by pressing the button. Built with text fields, so InputQty also supports typing quantity manually. The input value will automatically return to the pre-set maximum/minimum value. The cursor will automatically move to the right side after typing for a better user experience.
- Simple and easy to use
- Customizeable
- Button changed color automatically when reach max/min value and function disabled
- Cursor automatically moves to the right for better user experience
- Set maximum, minimum and initial value
- Deveoped with changenotifier to avoid rebuilding the widget every time it changes its value
- Use the steps to change every key pressed
- Intrinsic and expanded size
example:
import 'package:input_quantity/input_quantity.dart';
...
InputQty(
maxVal: 100,
initVal: 0,
minVal: -100,
isIntrinsicWidth: false,
borderShape: BorderShapeBtn.circle,
boxDecoration: const BoxDecoration(),
steps: 10,
onQtyChanged: (val) {
print(val);
},
),
- Develop Widgets of alternative
IntrinsicHeight
andIntrinsicWidth
, for inexpensive widgets. - Validator feature
-
To contrib to this project, you can open a PR or an issue.
-
Want to thank me? you can buy me a coffee