DoubleExtension extension

Extension methods for double values

on

Methods

roundToNearest(double nearest) double

Available on double, provided by the DoubleExtension extension

Round to nearest value
toCurrency({String symbol = '\$', int decimalPlaces = 2}) String

Available on double, provided by the DoubleExtension extension

Format as currency
toFormattedString({int decimalPlaces = 2}) String

Available on double, provided by the DoubleExtension extension

Format with thousand separators
toPercentage({int decimalPlaces = 2}) String

Available on double, provided by the DoubleExtension extension

Format as percentage