isNonEmpty<T> function
- List<
T> list
Checks whether the given list
is not empty.
print(isNonEmpty([1, 2, 3])); // true
print(isNonEmpty([])); // false
Implementation
bool isNonEmpty<T>(List<T> list) => list.isNotEmpty;