NumExtensions2<T extends num> extension

on
  • T

Properties

days → Duration

Available on T, provided by the NumExtensions2 extension

no setter
daysToHours → double

Available on T, provided by the NumExtensions2 extension

Transform number of days into hours
no setter
forceNegative → T

Available on T, provided by the NumExtensions2 extension

Returns the value with a negative sign, regardless of its original sign.
no setter
forcePositive → T

Available on T, provided by the NumExtensions2 extension

Returns the value unsigned, regardless of its original sign.
no setter
formatFileSize → String

Available on T, provided by the NumExtensions2 extension

Returns a formatted string representation of the file size.
no setter
hasDecimal → bool

Available on T, provided by the NumExtensions2 extension

no setter
heightBox → SizedBox

Available on T, provided by the NumExtensions2 extension

no setter
hours → Duration

Available on T, provided by the NumExtensions2 extension

no setter
hoursToDays → double

Available on T, provided by the NumExtensions2 extension

Transform number of hours into days
no setter
hoursToMinutes → double

Available on T, provided by the NumExtensions2 extension

Transform number of hours into minutes
no setter
microseconds → Duration

Available on T, provided by the NumExtensions2 extension

no setter
milliseconds → Duration

Available on T, provided by the NumExtensions2 extension

no setter
minutes → Duration

Available on T, provided by the NumExtensions2 extension

no setter
minutesToHours → double

Available on T, provided by the NumExtensions2 extension

Transform number of minutes into hours
no setter
seconds → Duration

Available on T, provided by the NumExtensions2 extension

no setter
secondsToHours → double

Available on T, provided by the NumExtensions2 extension

Transform number of seconds into hours
no setter
secondsToMinutes → double

Available on T, provided by the NumExtensions2 extension

Transform number of seconds into minutes
no setter
squareBox → SizedBox

Available on T, provided by the NumExtensions2 extension

no setter
weeks → Duration

Available on T, provided by the NumExtensions2 extension

no setter
widthBox → SizedBox

Available on T, provided by the NumExtensions2 extension

no setter
years → Duration

Available on T, provided by the NumExtensions2 extension

no setter

Methods

clampMax(T maxValue) → T

Available on T, provided by the NumExtensions2 extension

Returns the smaller value between this value and maxValue.
clampMin(T minValue) → T

Available on T, provided by the NumExtensions2 extension

Returns the larger value between this value and minValue.
clampRotate(T minValue, T maxValue) → T

Available on T, provided by the NumExtensions2 extension

Clamps the value between minValue and maxValue and rotates it if necessary.
delay<F>([FutureOr<F> callback()?]) → FutureOr<F>

Available on T, provided by the NumExtensions2 extension

delay a callback for the given milliseconds
findGreatestCommonDivisor(int other) → int

Available on T, provided by the NumExtensions2 extension

Finds the greatest common divisor between this integer and the given integer other.
isBetween(num start, num end) → bool

Available on T, provided by the NumExtensions2 extension

isBetweenOrEqual(num start, num end) → bool

Available on T, provided by the NumExtensions2 extension

isEqual(num b) → bool

Available on T, provided by the NumExtensions2 extension

isGreaterThan(num b) → bool

Available on T, provided by the NumExtensions2 extension

isLowerThan(num b) → bool

Available on T, provided by the NumExtensions2 extension

quantityText(String plural, [String singular = "", bool includeNumber = true, string? locale]) → String

Available on T, provided by the NumExtensions2 extension

Returns a formatted quantity text based on the provided parameters.
toCurrency({bool? withSymbol, string? locale}) → String

Available on T, provided by the NumExtensions2 extension

Num to locale currency with symbol or not
toCurrencyCompact({bool? withSymbol, string? locale}) → String

Available on T, provided by the NumExtensions2 extension

Num to locale compact currency with symbol or not
toLocalizedString([string? locale]) → string

Available on T, provided by the NumExtensions2 extension

return a number as a string according to the locale
toPrecision(int fractionDigits) → double

Available on T, provided by the NumExtensions2 extension

Num with specific fraction digits