isBlanksOnly property

bool get isBlanksOnly

Returns true if only whitespaces are present.

final str = "   ";
str.isBlanksOnly;  // true

Implementation

bool get isBlanksOnly => trim().isEmpty;