isNullOrWhiteSpace property
bool
get
isNullOrWhiteSpace
Indicates whether a specified string is null, empty, or consists only of white-space characters.
Implementation
bool get isNullOrWhiteSpace {
var length = (this.split('')).where((x) => x == ' ').length;
return length == (this.length) || this.isEmpty;
}