RollingDigitCounter constructor
const
RollingDigitCounter({})
Creates an odometer-style rolling digit counter.
value — target numeric value to animate toward (required).
decimals — decimal places to display.
duration — animation duration.
style — text style for the digits.
autoplay — whether animation starts automatically.
keepAlive — preserves animation state in scroll-off.
digitWidth — width of each digit box in pixels.
digitHeight — height of each digit box in pixels.
backgroundColor — background color of each digit box.
Implementation
const RollingDigitCounter({
super.key,
required this.value,
this.decimals = 0,
this.duration = const Duration(milliseconds: 1000),
this.style,
this.autoplay = true,
this.keepAlive = true,
this.digitWidth = 28,
this.digitHeight = 40,
this.backgroundColor,
});