NumCustomFuncsExtensions extension
Num custom functions extensions
- on
Properties
- absolute → int
-
Available on num, provided by the NumCustomFuncsExtensions extension
Gets the absolute value of the integer.no setter - isEven → bool
-
Available on num, provided by the NumCustomFuncsExtensions extension
Checks if the number is even. Returns true if the number is evenly divisible by 2, otherwise false.no setter - isOdd → bool
-
Available on num, provided by the NumCustomFuncsExtensions extension
Checks if the number is odd. Returns true if the number is not evenly divisible by 2, otherwise false.no setter - isPrime → bool
-
Available on num, provided by the NumCustomFuncsExtensions extension
Checks if the number is a prime number. A prime number is a natural number greater than 1 that cannot be formed by multiplying two smaller natural numbers. Returns true if the number is prime, otherwise false.no setter - numberOfDigits → int
-
Available on num, provided by the NumCustomFuncsExtensions extension
Counts the number of digits in this number. For example, calling this on 12345 would return 5.no setter - random → num
-
Available on num, provided by the NumCustomFuncsExtensions extension
Generates a random number between 0 and this number. If this number is an integer, the result is an integer. If this number is a double, the result is a double scaled by this value.no setter
Methods
-
microsecondsDelay(
) → Future< void> -
Available on num, provided by the NumCustomFuncsExtensions extension
Causes the current Dart async function to wait for a given number of microseconds. -
millisecondsDelay(
) → Future< void> -
Available on num, provided by the NumCustomFuncsExtensions extension
Causes the current Dart async function to wait for a given number of milliseconds. -
secondsDelay(
) → Future< void> -
Available on num, provided by the NumCustomFuncsExtensions extension
Causes the current Dart async function to wait for a given number of seconds.