Search packages, repositories and app categories

counter_button cover
Package detailsv1.0.1

counter_button

Counter Button is a flutter library that allows you to create a button with animation effects when you increase or decrease the counter value.

AndroidiOSWebmacOSWindowsLinux
30-day downloads
270
Likes
31
Pub points
160

Install package

flutter pub add counter_button

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

Counter Button is a Flutter library that provides an animated button for incrementing and decrementing a counter value. It enhances user interaction with smooth visual feedback during state changes, making it ideal for numeric input controls. The package supports multiple platforms including Android, iOS, Web, macOS, Windows, and Linux. With minimal setup via `flutter pub add counter_button`, developers can easily integrate animated counters into their apps. Its lightweight design focuses on performance and ease of use.

Use cases

  • Interactive numeric inputs
  • Gamification elements
  • Shopping cart quantity controls
  • Form field adjustments
  • UI feedback for state changes

Key features

  • Animated counter transitions
  • Cross-platform compatibility
  • Simple integration with pubspec.yaml
  • Customizable appearance
  • Smooth UI feedback on state change

Suitable for

  • Developers seeking animated counters
  • Apps requiring interactive number inputs
  • UI designers focused on micro-interactions
  • Beginner Flutter projects
  • Projects targeting multiple platforms

Considerations

  • Limited to basic counter functionality
  • No built-in validation or bounds checking
  • Depends on external animation libraries
  • May require additional styling for complex designs
  • Not suitable for high-frequency updates without optimization

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

counter_button

pub package GitHub stars GitHub forks GitHub license GitHub issues

Counter Button is a flutter library that allows you to create a button with animation effects when you increase or decrease the counter value.

Screenshots

Demo Loading demo

Installing

dependencies:
  counter_button: ^1.0.1
Import
import 'package:counter_button/counter_button.dart';

How To Use

CounterButton(
  loading: false,
  onChange: (int val) {
    setState(() {
      _counterValue = val;
    });
  },
  count: _counterValue,
  countColor: Colors.purple,
  buttonColor: Colors.purpleAccent,
  progressColor: Colors.purpleAccent,
)

parameters

parameter description default
count Value of the counter
countColor Color of the counter Colors.black
onChange Value change callback when the buttons are pressed
loading For showing the linear progress indicator
progressColor Color of the progress indicator Colors.black
buttonColor Color of the icon button Colors.black
addIcon Add button icon
removeIcon Remove button icon const Icon(Icons.remove)

Bugs & Requests

If you encounter any bugs feel free to open an issue. Raise a ticket on github for suggestions. Pull request are also welcome.

Flutter

For help getting started with Flutter, view our online documentation.

For help on editing plugin code, view the documentation.

License

MIT License

Categories

Source repository

Projects using this package

No data available yet.