animated_counter_x 0.0.1 copy "animated_counter_x: ^0.0.1" to clipboard
animated_counter_x: ^0.0.1 copied to clipboard

A Flutter widget that animates numbers (integers or doubles) from a start value to an end value with customizable duration and direction (increment or decrement).

Animated Counter X #

A Flutter widget that animates numbers (integers or doubles) from a start value to an end value with customizable duration and direction (increment or decrement).

Features #

  • Animate int or double.
  • Configurable start and end values.
  • Increment (count up) or decrement (count down) mode.
  • Custom animation duration.
  • Optional text styling.
  • Decimal precision for doubles.
  • onComplete callback when the counter finishes.
  • Optional prefix and suffix text.

Installation #

Add this to your pubspec.yaml:

dependencies:
  animated_counter_x: ^0.0.1

Usage #

Increment from 1 → 100 with prefix #

AnimatedCounterX(
  start: 1,
  end: 100,
  duration: Duration(seconds: 5),
  style: TextStyle(fontSize: 30, fontWeight: FontWeight.bold),
  increment: true,
  prefix: "\$",
  onComplete: () {
    print('Increment finished!');
  },
)

Decrement from 100 → 1 with suffix #

AnimatedCounterX(
  start: 100,
  end: 1,
  duration: Duration(seconds: 5),
  style: TextStyle(fontSize: 30, fontWeight: FontWeight.bold, color: Colors.red),
  suffix: "%",
  onComplete: () {
    print('Decrement complete!');
  },
)
0
likes
160
points
45
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

A Flutter widget that animates numbers (integers or doubles) from a start value to an end value with customizable duration and direction (increment or decrement).

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

flutter

More

Packages that depend on animated_counter_x