parts property
Split string into parts according to their case.
- All result parts will be lowercased.
- It will split by non-alphabet-and-digit characters, including whitespace and hyphen.
- About the case change without separator, see splitCamelCase.
Implementation
List<String> get parts => split(RegExp('[^a-zA-Z0-9]'))
.map((part) => part.splitCamelCase)
.expand((nestedPart) => nestedPart)
.toList();