capitalizeFirstLetter function
Capitalize the first letter if required
Implementation
String? capitalizeFirstLetter(String? text) {
if (text != null && text.isNotEmpty ) {
return text.substring(0, 1).toUpperCase() + text.substring(1);
}
return text;
}