isEmptyOrNull property
bool
get
isEmptyOrNull
Checks if the iterable is either null or empty.
Returns true if the iterable is null or empty, otherwise false.
Example:
List<int>? list = null;
print(list.isEmptyOrNull); // true
list = [];
print(list.isEmptyOrNull); // true
list = [1, 2, 3];
print(list.isEmptyOrNull); // false
Implementation
bool get isEmptyOrNull => this == null || this!.isEmpty;