numberToString method Null safety

  1. @override
String numberToString()
override

String describing just the numeric value without a unit suffix.

Implementation

@override
String numberToString() {
  final double? v = value;
  if (v == null)
    return value.toString();
  return '${(v.clamp(0.0, 1.0) * 100.0).toStringAsFixed(1)}%';
}