parseWithCurrencyImproved static method

Money parseWithCurrencyImproved(
  1. String amount,
  2. Currency currency, {
  3. int? scale,
})

Creates a Money from a Fixed amount.

The amount is scaled to match the currency selected via currency.

Implementation

static Money parseWithCurrencyImproved(
  String amount,
  Currency currency, {
  int? scale,
}) =>
    Money.fromFixedWithCurrency(
      Fixed.parse(amount, scale: scale ?? currency.decimalDigits),
      currency,
    );