number_counting_animation 0.0.2
number_counting_animation: ^0.0.2 copied to clipboard
Number Counting Animation package - A simple flutter counting animation widget. sample page link -> https://pub.dev/packages/number_counting_animation/example
NumberCountingAnimation #
-
A simple flutter counting animation widget.
Installing #
Add this to your package’s pubspec.yaml file:
dependencies:
number_counting_animation: ^0.0.1
CountingAnimation #
type | name | description | default |
---|---|---|---|
String | value | show value | - |
TextStyle | textStyle | text style | - |
bool | useChar | value have non-animation character | false |
int | scrollCount | total amount of play to scroll animation | 40 |
Duration | singleScrollDuration | duration for each scroll animation | 50ms |
Duration | lastDuration | duration for last animation | 50ms |
Color | bgColor | widget back ground color | transparent |
bool | useRefresh | restart animation when value changed | true |
How to use #
CountingAnimation(
value: '12,345',
textStyle: const TextStyle(
color: Colors.blue,
fontSize: 20,
),
useChar: true,
scrollCount: 10,
singleScollDuration: const Duration(milliseconds: 200),
lastDuration: const Duration(milliseconds: 1000),
),