getWords method

List<String> getWords()

Implementation

List<String> getWords() {
  var trimmed = trim();
  List<String> value;

  value = trimmed.split(RegExp(r'[_\W]'));
  value = value.where((element) => element.isNotEmpty).toList();
  value = value.expand((e) => e.split(RegExp(r'(?=[A-Z])'))).where((element) => element.isNotEmpty).toList();

  return value;
}