AnimatedNumericText constructor

AnimatedNumericText({
  1. Key? key,
  2. required double initialValue,
  3. required double targetValue,
  4. required AnimationController controller,
  5. Curve curve = Curves.linear,
  6. String formatter = '#,##0.00',
  7. TextStyle? style,
})

Implementation

AnimatedNumericText({
  Key? key,
  required this.initialValue,
  required this.targetValue,
  required this.controller,
  this.curve = Curves.linear,
  this.formatter = '#,##0.00',
  this.style,
})  : numberFormat = NumberFormat(formatter),
      numberAnimation = Tween<double>(
        begin: initialValue,
        end: targetValue,
      ).animate(CurvedAnimation(
        parent: controller,
        curve: curve,
      )),
      super(key: key);