getLength static method
get length.
Implementation
static int getLength(Object? value) {
if (value == null) return 0;
if (value is String) {
return value.length;
} else if (value is Iterable) {
return value.length;
} else if (value is Map) {
return value.length;
} else {
return 0;
}
}