toCurrencyCompact method
Num to locale compact currency with symbol or not
Implementation
String toCurrencyCompact({bool? withSymbol, string? locale}) {
locale ??= platformLocaleCode;
if (withSymbol == false) {
return NumberFormat.compactSimpleCurrency(name: '', locale: locale).format(this).trim();
} else {
return NumberFormat.compactSimpleCurrency(locale: locale).format(this).trim();
}
}