NumberFormatOptions.currency constructor

NumberFormatOptions.currency({
  1. required String currency,
  2. CurrencyDisplay currencyDisplay = CurrencyDisplay.symbol,
  3. CurrencySign currencySign = CurrencySign.standard,
  4. LocaleMatcher localeMatcher = LocaleMatcher.bestfit,
  5. SignDisplay signDisplay = SignDisplay.auto,
  6. Notation notation = const StandardNotation(),
  7. Grouping useGrouping = Grouping.auto,
  8. String? numberingSystem,
  9. RoundingMode roundingMode = RoundingMode.halfExpand,
  10. TrailingZeroDisplay trailingZeroDisplay = TrailingZeroDisplay.auto,
  11. int minimumIntegerDigits = 1,
  12. Digits? digits,
})

Implementation

factory NumberFormatOptions.currency({
  required String currency,
  CurrencyDisplay currencyDisplay = CurrencyDisplay.symbol,
  CurrencySign currencySign = CurrencySign.standard,
  //General options
  LocaleMatcher localeMatcher = LocaleMatcher.bestfit,
  SignDisplay signDisplay = SignDisplay.auto,
  Notation notation = const StandardNotation(),
  Grouping useGrouping = Grouping.auto,
  String? numberingSystem,
  RoundingMode roundingMode = RoundingMode.halfExpand,
  TrailingZeroDisplay trailingZeroDisplay = TrailingZeroDisplay.auto,
  int minimumIntegerDigits = 1,
  Digits? digits,
}) {
  return NumberFormatOptions.custom(
    currency: currency,
    style: CurrencyStyle(
      currency: currency,
      display: currencyDisplay,
      sign: currencySign,
    ),
    localeMatcher: localeMatcher,
    signDisplay: signDisplay,
    notation: notation,
    useGrouping: useGrouping,
    numberingSystem: numberingSystem,
    roundingMode: roundingMode,
    trailingZeroDisplay: trailingZeroDisplay,
    minimumIntegerDigits: minimumIntegerDigits,
    digits: digits,
  );
}