debugFormatDouble function Null safety

String debugFormatDouble(
  1. double? value
)

Formats a double to have standard formatting.

This behavior can be overridden by debugDoublePrecision.

Implementation

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