Formats value as a compact number (e.g. 1.2K, 3.4M).
value
1.2K
3.4M
static String compact(num value, {String? locale}) { final NumberFormat format = NumberFormat.compact(locale: locale); return format.format(value); }