isNotEmpty method
Check if value is empty or not.
If empty then it returns InvariantException.
Implementation
void isNotEmpty([String? what]) {
if (value != null && value is List && value.length != 0) {
return;
}
if (value != null && value is String && value.length != 0) {
return;
}
throw InvariantException('not-empty', what);
}