isWhitespaceOnly property

  1. @useResult
bool get isWhitespaceOnly

True if this string is non-empty and contains only whitespace. Audited: 2026-06-12 11:26 EDT

Implementation

@useResult
bool get isWhitespaceOnly => trim().isEmpty && isNotEmpty;