ExtNum extension

on

Properties

allPadding → EdgeInsets

Available on num, provided by the ExtNum extension

Creates uniform EdgeInsets with this number.
no setter
durD → Duration

Available on num, provided by the ExtNum extension

Converts this number to a Duration in days.
no setter
durH → Duration

Available on num, provided by the ExtNum extension

Converts this number to a Duration in hours.
no setter
durMin → Duration

Available on num, provided by the ExtNum extension

Converts this number to a Duration in minutes.
no setter
durMs → Duration

Available on num, provided by the ExtNum extension

Converts this number to a Duration in milliseconds.
no setter
durS → Duration

Available on num, provided by the ExtNum extension

Converts this number to a Duration in seconds.
no setter
gap → Widget

Available on num, provided by the ExtNum extension

Converts this number into a vertical or horizontal gap widget.
no setter
h → Widget

Available on num, provided by the ExtNum extension

Converts this number into a vertical SizedBox.
no setter
hPadding → EdgeInsets

Available on num, provided by the ExtNum extension

Creates horizontal EdgeInsets with this number.
no setter
padZero → String

Available on num, provided by the ExtNum extension

Pads the number with a leading zero if it is less than 10.
no setter
radius → BorderRadius

Available on num, provided by the ExtNum extension

Creates a circular BorderRadius or a uniform Border with this number as radius or width.
no setter
v → num

Available on num, provided by the ExtNum extension

Alias for value.
no setter
value → num

Available on num, provided by the ExtNum extension

Returns an integer if this number is whole, otherwise returns itself.
no setter
vPadding → EdgeInsets

Available on num, provided by the ExtNum extension

Creates vertical EdgeInsets with this number.
no setter
w → Widget

Available on num, provided by the ExtNum extension

Converts this number into a horizontal SizedBox.
no setter

Methods

border({Color color = Colors.black}) → Border

Available on num, provided by the ExtNum extension

Creates a uniform Border with this number as width.
clampMax(num max) → num

Available on num, provided by the ExtNum extension

Returns this number clamped to a maximum value max.
clampMin(num min) → num

Available on num, provided by the ExtNum extension

Returns this number clamped to a minimum value min.
formatCompact([String? locale]) → String

Available on num, provided by the ExtNum extension

Formats this number into a compact string (e.g. 1.2K, 3.4M).
isInInterval(num a, num b, {bool excludeA = false, bool excludeB = false}) → bool

Available on num, provided by the ExtNum extension

Checks if this number is within the interval a, b.
percentOf(num total) → double

Available on num, provided by the ExtNum extension

Calculates the percentage this number represents of total.
roundTo(int decimals) → double

Available on num, provided by the ExtNum extension

Rounds this number to decimals decimal places.