/input-quantity

Flutter widget for input quantity item

Primary LanguageDartMIT LicenseMIT

Input Quantity

pub package package publisher Star on Github License: MIT

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.

img prev

Features

  • 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

Usage

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

To Do

  • Develop Widgets of alternative IntrinsicHeight and IntrinsicWidth , for inexpensive widgets.
  • Validator feature

Additional information

  • To contrib to this project, you can open a PR or an issue.

  • Want to thank me? you can buy me a coffee