isEmpty static method
判空
Implementation
static bool isEmpty(dynamic value) {
if (value == null) {
return true;
}
if (value is String) {
return value.toString().trim().isEmpty || value == "null";
}
if (value is Iterable || value is Map) {
return value.isEmpty as bool;
}
return false;
}