counter 0.2.2 icon indicating copy to clipboard operation
counter: ^0.2.2 copied to clipboard

A Flutter counter widget, supports min/max/initial/bound/step value with type int/double, and supports appearance configuration.

counter #

简体中文

A Flutter counter widget, supports min/max/initial/bound/step value with type num, and supports appearance configuration.

Getting Started #

  1. Add dependency to pubspec.yaml, and run flutter pub get
counter: ^0.2.2
  1. import the package
import 'package:counter/counter.dart';
  1. expample code
Counter(
  /// min value
  min: 0,
  
  /// max value
  max: 10,

  /// bound value, default null,must be greater than or equal to [min] and less than or equal to [max].
  /// current value can not be greater than [min] and less than bound if bound is not null and its approved.
  /// if current value is [min], and bound value greater than [min] too, and the value will be change with bound value by one step after inscrease button clicked.
  /// and it will be change with [min] value by one step after descrease button clicked.
  bound: 3,

  /// initial value, default equal to [min], must be greater than or equal to [min] and less than or equal to [max].
  /// and initial value must be greater or equal to [bound], while bound and initial value both not be null.
  initial: 5,
  
  /// stepper,default 1
  step: 1,
  
  /// appearance configuration,default DefaultConfiguration()
  /// you can also set up custom appearance by implements [Configuration] class.
  configuration: DefaultConfiguration(),
  
  /// value changed callback.
  onValueChanged: print,
)
  1. feature support
  • support type num(include int/double) values.

  • support min/max/initial/bound values.

  • support set up custom appearance.

  • support value changed callback.

    will soon...

  • type in value from keyboard

1
likes
140
pub points
83%
popularity

Publisher

unverified uploader

A Flutter counter widget, supports min/max/initial/bound/step value with type int/double, and supports appearance configuration.

Repository (GitHub)

Documentation

API reference

License

Icon for licenses.MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on counter