NumCustomFuncsExtensions extension

Num custom functions extensions

on

Properties

absolute int
Gets the absolute value of the integer.
no setter
isEven bool
Checks if the number is even. Returns true if the number is evenly divisible by 2, otherwise false.
no setter
isOdd bool
Checks if the number is odd. Returns true if the number is not evenly divisible by 2, otherwise false.
no setter
isPrime bool
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
Counts the number of digits in this number. For example, calling this on 12345 would return 5.
no setter
random num
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>
Causes the current Dart async function to wait for a given number of microseconds.
millisecondsDelay() Future<void>
Causes the current Dart async function to wait for a given number of milliseconds.
secondsDelay() Future<void>
Causes the current Dart async function to wait for a given number of seconds.