formatCurrency method
String
formatCurrency(
{ - bool includeSymbol = true,
- bool includeCents = true,
})
Implementation
String formatCurrency({bool includeSymbol = true, bool includeCents = true}) {
if (includeSymbol && includeCents) {
return _kCurrencyFormatterSymbolWithCents.format(this);
} else if (includeSymbol && !includeCents) {
return _kCurrencyFormatterSymbolNoCents.format(this);
} else if (!includeSymbol && includeCents) {
return _kCurrencyFormatterNoSymbolWithCents.format(this);
} else {
return _kCurrencyFormatterNoSymbolNoCents.format(this);
}
}