isValid method
Implementation
@override
bool isValid(S state) {
switch (state) {
case String():
return state.isNotEmpty;
case Iterable():
return state.isNotEmpty;
case File():
return state.existsSync();
case bool():
return null is S || state;
default:
return state != null;
}
}