toCapitalized method
Capitalizes the first letter and lower cases everything else.
E.g. someText -> Sometext
Implementation
String toCapitalized() =>
length > 0 ? '${this[0].toUpperCase()}${substring(1).toLowerCase()}' : '';
Capitalizes the first letter and lower cases everything else.
E.g. someText -> Sometext
String toCapitalized() =>
length > 0 ? '${this[0].toUpperCase()}${substring(1).toLowerCase()}' : '';