debugFormatDouble function

String debugFormatDouble (double value)

Formats a double to have standard formatting.

This behavior can be overriden by debugDoublePrecision.

Implementation

String debugFormatDouble(double value) {
  if (value == null) {
    return 'null';
  }
  if (debugDoublePrecision != null) {
    return value.toStringAsPrecision(debugDoublePrecision);
  }
  return value.toStringAsFixed(1);
}