isNullOrWhitespace property

bool get isNullOrWhitespace

Checks if this string is null, empty, or contains only whitespace

Example:

print('   '.isNullOrWhitespace); // true
print('hello'.isNullOrWhitespace); // false

Implementation

bool get isNullOrWhitespace => trim().isEmpty;