formatDouble function

String formatDouble(
  1. num? value
)

Implementation

String formatDouble(num? value) {
  if (value == null) return "0";
  return (value % 1 == 0) ? value.toInt().toString() : value.toStringAsFixed(1);
}