OptimisedAnimatedDigit constructor

OptimisedAnimatedDigit({
  1. Key? key,
  2. required TransformerHistoryValueNotifier<num, List<String>> valueNotifier,
  3. Color? negativeColor,
  4. Color? positiveColor,
  5. Color? neutralColor,
  6. required TextStyle textStyle,
  7. required int milliseconds,
  8. Widget? decimal,
  9. Widget? digitsSeparator,
})

Implementation

OptimisedAnimatedDigit({
  super.key,
  required this.valueNotifier,
  Color? negativeColor,
  Color? positiveColor,
  Color? neutralColor,
  required this.textStyle,
  required this.milliseconds,
  this.decimal,
  this.digitsSeparator,
}) {
  assert(milliseconds >= 100,
      "milliseconds should be greater or equal to 100 for smooth animation");
  _negativeColor = negativeColor ?? Colors.black;
  _positiveColor = positiveColor ?? Colors.black;
  _neutralColor = neutralColor ?? Colors.black;
}