formatLabel function

String formatLabel(
  1. LabelFormatter formatter,
  2. double value
)

Implementation

String formatLabel(LabelFormatter formatter, double value) {
  if (formatter.numberFormat != null) {
    return formatter.numberFormat!(value);
  }
  return formatter.defaultFormat.format(value);
}