compact static method
Compact number: 1.2K, 1.5M, etc.
Implementation
static String compact(double value, {String? locale}) {
final key = 'compact_${locale ?? 'en'}';
final fmt = _numCache.putIfAbsent(
key,
() => NumberFormat.compact(locale: locale),
);
return fmt.format(value);
}