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
compact
istrue
it will format as compactedPrecision instance. - If
thousands
istrue
it will use thousands delimiters for the wholePart. - If
decimal
istrue
it will add the decimalPartAsString to the String result. decimalDelimiter
is the delimiter for the decimal part.thousandsDelimiter
is 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);
}