capitalize method
Capitalizes the first letter of the given string.
Implementation
String capitalize(String text) {
if (text.isEmpty) return '';
if (text[0] == '/') {
text = text.substring(1);
}
return text[0].toUpperCase() + text.substring(1);
}