Int class

Integer constraints — limits input data to integer values.

Examples:

  • valid input: "1", "+555", "123", "-1".
  • invalid input: "9.99", "-1.1", "A", "12A", "12.A3".

Constructors

Int({String? mal})
Constrains data to integer numbers.
Int.max(int max, {String? mal, String? large})
Constrains data to integer values that are less than or equal to max.
Int.min(int min, {String? mal, String? small})
Constrains data to integer numbers greater than or equal to min.
Int.neg({String? mal, String? pos})
Constrains data to negative integer numbers (zero excluded).
Int.pos({String? mal, String? neg})
Constrains data to positive integer numbers (zero included).
Int.range(int min, int max, {String? mal, String? small, String? large})
Constrains data to integer values within the range min–max.

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

call(String? input) String?
Valid — returns null – if input is either integer or null.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited