initials method
Returns the initials of the string.
Implementation
String initials() {
return split(' ')
.where((word) => word.isNotEmpty)
.map((word) => word[0].toUpperCase())
.join('');
}
Returns the initials of the string.
String initials() {
return split(' ')
.where((word) => word.isNotEmpty)
.map((word) => word[0].toUpperCase())
.join('');
}