Examples
- Basic Usage
- With Formatter
- Face-Value Mode
Properties
Required
num
required
The numeric value to display. When this changes, each digit rolls through intermediate values (in
continuous mode) or directly to the new face value.Content
String Function(num value)
Converts
value to a display string. Supports locale-aware separators (both . and , as decimal points). Pass a top-level or static function to keep its identity stable across builds and avoid discarding cached transitions.Defaults to value.toString().TextStyle
Text style applied to all digits and decorators. Merges with
DefaultTextStyle.TextAlign
Horizontal alignment of the counter within its bounding box.
TextDirection
Reading direction. Defaults to the ambient
Directionality.Styling
Duration
Override the animation duration. Defaults to
theme.durations.long.bool
default:"true"
When
true (default), digits roll through every intermediate step like an odometer — e.g. going from 100 to 200 spins the tens and units through all values. When false, only digits whose face value actually changes animate, jumping directly to the target digit.double
default:"0.25"
Fraction of the line height used as vertical padding on each edge for the fade-out gradient. Higher values give a taller fade zone above and below the rolling digits. Defaults to
0.25.Best Practices
- Use
continuous: truefor a value that should roll through the steps, such as a score. Usecontinuous: falsewhen the value jumps and rolling every step would be wrong.
Behavior
- An inline
formatteris a new function every build, so the roll restarts even whenvalueis unchanged. Pass a top-level,static, oruseMemoizedfunction. - Decimal separators
.and,split the roll into an integer group and a fraction group. - Digits use tabular figures, so columns do not change width during the roll.
- It measures itself like a
Textof the formatted value. - The semantics label is the formatted string.

