A simple and easy to use widget to help you show numbers by animation.
dependencies:
number_animation: ^0.2.0
import 'package:flutter/material.dart';
import 'package:number_animation/number_animation.dart';
...
@override
Widget build(BuildContext context) {
return NumberAnimation(end: 100);
}
param | description | type | default value |
---|---|---|---|
start | start number | num | 0.0 |
end | end nunber | String | null |
isInt | true for int, false for double | String | false |
duration | animation duration | String | const Duration(milliseconds: 1000) |
style | TextStyle | String | null |
textAlign | TextAlign | String | null |
strutStyle | StrutStyle | String | null |
before | number prefix | String | '' |
after | number suffix | String | '' |
decimalPoint | decimal point, enable when 'isInt = false' | int | 2 |
isLoading | is on loading | String | false |
loadingPlaceHolder | loading placeholder, enable when 'isLoading = true' | String | '' |
Preview: