format method
String
format({
- bool compact = false,
- String decimalDelimiter = '.',
- bool thousands = true,
- String thousandsDelimiter = ',',
- bool decimal = true,
override
Formats this decimal to a String.
- If
compactistrueit will format as compactedPrecision instance. - If
thousandsistrueit will use thousands delimiters for the wholePart. - If
decimalistrueit will add the decimalPartAsString to the String result. decimalDelimiteris the delimiter for the decimal part.thousandsDelimiteris the thousands delimiter.
Implementation
@override
String format(
{bool compact = false,
String decimalDelimiter = '.',
bool thousands = true,
String thousandsDelimiter = ',',
bool decimal = true}) {
var self = this;
if (compact) {
self = self.compactedPrecision;
}
return self._formatImpl(
thousands, thousandsDelimiter, decimalDelimiter, decimal);
}