isEmpty static method
Returns true String or List or Map is empty.
Implementation
static bool isEmpty(Object? object) {
if (object == null) return true;
if (object is String && object.isEmpty) {
return true;
} else if (object is Iterable && object.isEmpty) {
return true;
} else if (object is Map && object.isEmpty) {
return true;
}
return false;
}