unFormatCurrency static method
double
unFormatCurrency(
- String amount, {
- String currency = 'id_IDR',
- dynamic symbol,
- dynamic decimalPattern = 'id_ID',
- dynamic digits = 2,
})
Implementation
static double unFormatCurrency(String amount, {String currency = 'id_IDR', symbol, decimalPattern = 'id_ID', digits = 2}) {
final money = NumberFormat.currency(
locale: defaultCurrency ?? currency,
symbol: defaultCurrencySymbol ?? symbol,
decimalDigits: defaultDecimalDigits ?? digits,
);
// money.parse(amount);
return money.parse(amount).toDouble();
}