format method
Implementation
@override
String format(Object value, String? format, String? locale) {
assert(value is num);
final number = value as num;
switch (format) {
case 'scientificPattern':
return NumberFormat.scientificPattern(locale.toString()).format(number);
case 'percentPattern':
return NumberFormat.percentPattern(locale.toString()).format(number);
case 'decimalPercentPattern':
return NumberFormat.decimalPattern(locale.toString()).format(number);
case 'compact':
return NumberFormat.compact(locale: locale.toString()).format(number);
default:
return NumberFormat(format, locale.toString()).format(number);
}
}