validator property
You can create the item T
with provided text
.
If T
is String just return the text
.
The validator function is called before creating the item.
If the function returns false
the item will not be created.
Implementation
final bool Function(T) validator;