isEmpty static method
Returns true if value
is null, an empty String, or an empty
Iterable.
Implementation
static bool isEmpty(dynamic value) {
if (value == null) {
return true;
}
if (value is String) {
return (value == "");
}
if (value is Iterable) {
return value.isEmpty;
}
return false;
}