getWords method

List<String> getWords()

Get Words from a String

Implementation

List<String> getWords() => RegExp(r'\b\w+\b')
    .allMatches(this)
    .map((match) => match.group(0)!)
    .toList();