IntExtensions extension

on

Properties

absolute → dynamic

Available on int, provided by the IntExtensions extension

Returns the absolute value
no setter
asBool bool

Available on int, provided by the IntExtensions extension

Convert this integer into boolean.
no setter
convertMinutesToPattern String

Available on int, provided by the IntExtensions extension

Converts an integer value representing minutes to a formatted string pattern.
no setter
doubled int

Available on int, provided by the IntExtensions extension

Return this number time two
no setter
fourth double

Available on int, provided by the IntExtensions extension

Returns fourth of the number
no setter
half double

Available on int, provided by the IntExtensions extension

Returns half of the number
no setter
humanize String

Available on int, provided by the IntExtensions extension

This getter provides a human-readable string representation of a number.
no setter
humanNum String

Available on int, provided by the IntExtensions extension

This extension provides a method get humanNum to get the ordinal form of an integer.
no setter
isEven bool

Available on int, provided by the IntExtensions extension

Returns if the number is even
no setter
isNegative bool

Available on int, provided by the IntExtensions extension

Returns if the number is negative
no setter
isOdd bool

Available on int, provided by the IntExtensions extension

Returns if the number is odd
no setter
isPositive bool

Available on int, provided by the IntExtensions extension

Returns if the number is positive
no setter
numberOfDigits int

Available on int, provided by the IntExtensions extension

Returns number of digits in this number
no setter
quadrupled int

Available on int, provided by the IntExtensions extension

Return this number time four
no setter
squared int

Available on int, provided by the IntExtensions extension

Return squared number
no setter
tenth double

Available on int, provided by the IntExtensions extension

Returns tenth of the number
no setter
third double

Available on int, provided by the IntExtensions extension

Returns third of the number
no setter
tripled int

Available on int, provided by the IntExtensions extension

Return this number time three
no setter

Methods

inRangeOf(int min, int max) int

Available on int, provided by the IntExtensions extension

Clamps the current integer to be within the range of min and max.
to(int maxInclusive, {int step = 1}) List<int>

Available on int, provided by the IntExtensions extension

Generates a list of integers from the current integer to maxInclusive with an optional step.
withDiscount(double? discount) int

Available on int, provided by the IntExtensions extension

Applies a discount to the current integer value and returns the discounted amount.