capitalize method
Implementation
String capitalize() {
if (this.isEmpty) return this;
return this
.split(' ')
.map((word) => word.isEmpty
? word
: '${word[0].toUpperCase()}${word.substring(1)}')
.join(' ');
}