Language: English | 中文简体

number_animation

A simple and easy to use widget to help you show numbers by animation.

Add dependency

dependencies:
  number_animation: ^0.1.2

Super simple to use

import 'package:flutter/material.dart';
import 'package:number_animation/number_animation.dart';


...
@override
Widget build(BuildContext context) {
    return NumberAnimation(end: 100);
}

Fields API

paramdescriptiontypedefault value
startstart numbernum0.0
endend nunberStringnull
isInttrue for int, false for doubleStringfalse
durationanimation durationStringconst Duration(milliseconds: 1000)
styleTextStyleStringnull
textAlignTextAlignStringnull
strutStyleStrutStyleStringnull
beforenumber prefixString''
afternumber suffixString''
decimalPointdecimal point, enable when 'isInt = false'int2
isLoadingis on loadingStringfalse
loadingPlaceHolderloading placeholder, enable when 'isLoading = true'String''

Full example code

Exmaple

Preview:

Example Demo

Libraries

number_animation