formatFor method

String formatFor(
  1. String locale
)

Formats for a locale tag ("en", "ru"); whole amounts drop the decimals.

Implementation

String formatFor(String locale) {
  final digits = _digits(currency);
  final whole = minor % math10(digits) == 0;
  return NumberFormat.simpleCurrency(locale: locale, name: currency, decimalDigits: whole ? 0 : digits).format(major);
}