Len class
Length-related constraints.
Valid input types: String, num, Iterable, and Map.
Constructors
-
Len.new(int len, {String? diff})
-
Constrains the length (number of items).
-
Len.max(int max, {String? long})
-
Constrains the length (number of items) to a maximum amount.
-
Len.min(int min, {String? short})
-
Constrains the length (number of items) to a minimum amount.
-
Len.range(int min, int max, {String? short, String? long})
-
Constrains the length (number of items) 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(Object? input)
→ String?
-
Valid - returns null - if the length of
input
satisfies the length
requirement.
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a nonexistent method or property is accessed.
inherited
-
toString()
→ String
-
A string representation of this object.
inherited