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

parameterdescriptiondefault
countValue of the counter
countColorColor of the counterColors.black
onChangeValue change callback when the buttons are pressed
loadingFor showing the linear progress indicator
progressColorColor of the progress indicatorColors.black
buttonColorColor of the icon buttonColors.black
addIconAdd button icon
removeIconRemove button iconconst 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

Libraries

counter_button