Skip to content
pubscout

input_quantity

2.6.0, released 7 months ago by pmatatias.com

A widget for quantity input with increment and decrement buttons and manual typing support.

WASM-ready
$ flutter pub add input_quantity
Source repository

What it does

Provides a Flutter widget built with TextFormField that allows users to increase or decrease numeric values using buttons or type them manually. Supports output types like int, double, or num, along with custom validators and limits.

AI-written summary of version 2.6.0, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need a quantity selector for e-commerce carts or order forms.
  • You want a text field combined with increment and decrease buttons.
  • You need to restrict input values within specific minimum and maximum limits.

Skip it when

  • You require a complex date or time picker rather than a simple numeric quantity input.
  • You do not need increment/decrement buttons and a standard TextFormField is sufficient.

Strengths

  • Supports both manual typing and button-based adjustments.
  • Customizable appearance with orientation and style options.
  • Supports multiple output data types (int, double, num).

Weaknesses

  • Limited to single-purpose quantity inputs.
  • Does not handle complex text input masks outside of basic numeric ranges.

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
1
InputQty(
  maxVal: 100,
  initVal: 0,
  minVal: -100,
  steps: 10,
  onQtyChanged: (val) {
    print(val);
  },
)

Alternatives

Packages that do the same job and could replace input_quantity.

Works with

Packages commonly used together with input_quantity: ones it builds on, ones built on it, and its own family.