Len class Null safety

Length-related constraints.

Valid input types: String, num, Iterable, and Map.

Constructors

Len(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. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

call(Object? input) String?
Valid - returns null - if the length of input satisfies the length requirement. [...]
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
A string representation of this object. [...]
inherited

Operators

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