words property

List<String> get words

Splits the string into a list of words.

Returns an empty list if the string is empty or contains only whitespace.

Implementation

List<String> get words {
  final normalized = normalizeWhitespace();
  return normalized.isEmpty ? [] : normalized.split(' ');
}