capitalize method
Capitalize the first string If the string is null or empty return default string.
Implementation
String capitalize() {
final value = this;
if (value.isNotNullOrEmpty()) {
return '${value![0].toUpperCase()}${value.substring(1)}';
}
return '';
}