toCapitalized method
Converts the first letter of a String into uppercase or returns '' if null
Example:
'carlos gutiƩrrez'.toCapitalized(); // Carlos gutiƩrrez
Implementation
String toCapitalized() =>
length > 0 ? '${this[0].toUpperCase()}${substring(1).toLowerCase()}' : '';