Digit class

Digit - any one of the ten numbers 0 to 9.

For example, the values "1" and "123" are valid; whereas the values "A", "12A", "123.34", "9.99" are invalid.

Blank field — null or empty — is a valid input.

If the field is mandatory, see ReqDigit or Req.

Constructors

Digit({String? mal})
Constrains the input data to the digits 0-9.
Digit.len(int len, {String? mal, String? diff})
Constrains the input data to the digits 0-9 and its length (number of digits) to len digits.
Digit.max(int max, {String? mal, String? long})
Constrains the input data to the digits 0-9 and its length (number of digits) to a maximum of max digits.
Digit.min(int min, {String? mal, String? short})
Constrains the input data to the digits 0-9 and its length (number of digits) to a minimum of min digits.
Digit.range(int min, int max, {String? mal, String? short, String? long})
Constrains the input data to the digits 0-9 and its length (number of digits) 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? digits) String?
Valid - returns null - if digits has only digits or is 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