format method

String format(
  1. double? n
)

Implementation

String format(double? n) {
  if (n == null || n.isNaN) return '0.00';
  if (dataFormat != null) return dataFormat!(n);

  return n.toStringAsFixed(2);
}