format<T extends Object> method
Format number according to specified parameters and return the formatted string.
Implementation
String format<T extends Object>(T? number) {
if (number == null) return '';
if (inWords) {
return isMonetory
? _placeSymbol(_formatInWords<T>(number))
: _formatInWords<T>(number);
} else {
return isMonetory
? _placeSymbol(_formatWithComma<T>(number))
: _formatWithComma<T>(number);
}
}