isNullOrEmpty property

bool get isNullOrEmpty

Returns true if the string is null or empty.

Example:

String? s;
s.isNullOrEmpty; // true
''.isNullOrEmpty; // true
'text'.isNullOrEmpty; // false
value?.isNullOrEmpty; // returns true or false

Implementation

bool get isNullOrEmpty => this == null || this!.isEmpty;