Skip to content
pubscout

counter_button

1.0.1, released 5 years ago by an unverified publisher

A Flutter button widget with built-in animation effects for increasing and decreasing counter values.

WASM-ready
$ flutter pub add counter_button
Source repository

What it does

Counter Button provides a specialized widget that creates an interactive counter button with animation effects when values are incremented or decremented. It supports custom colors, loading progress indicators, and custom icons.

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

Use it when

  • You need an interactive counter button with built-in animations for shopping carts or quantity selectors.
  • You want to easily display a loading state alongside counter increments and decrements.

Skip it when

  • You need complex custom animations not covered by the widget's built-in parameters.
  • You require a general-purpose state management solution rather than a single counter widget.

Strengths

  • Easy to implement with straightforward parameters like count, onChange, and colors.
  • Includes built-in support for loading indicators and custom icons.

Weaknesses

  • Limited to a specific counter button use case.
  • Customization is restricted to the exposed properties like colors and icons.

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
0
CounterButton(
  loading: false,
  onChange: (int val) {
    setState(() {
      _counterValue = val;
    });
  },
  count: _counterValue,
  countColor: Colors.purple,
  buttonColor: Colors.purpleAccent,
  progressColor: Colors.purpleAccent,
)

Alternatives

Packages that do the same job and could replace counter_button.