withCapitalizedWords method
Capitalizes each word in the string.
Implementation
String withCapitalizedWords() {
return trim()
.split(RegExp(r'[- ]+'))
.map((e) => e.trim().toLowerCase().capitalize())
.join(' ');
}
Capitalizes each word in the string.
String withCapitalizedWords() {
return trim()
.split(RegExp(r'[- ]+'))
.map((e) => e.trim().toLowerCase().capitalize())
.join(' ');
}