tokenize static method

List<String> tokenize(
  1. String text
)

Splits text into normalized, non-empty, whitespace-separated tokens.

Implementation

static List<String> tokenize(String text) {
  final normalized = normalizeForSearch(text);
  if (normalized.trim().isEmpty) return const [];
  return normalized
      .split(_whitespace)
      .where((token) => token.isNotEmpty)
      .toList();
}