initials static method
Implementation
static String initials(String text) {
String result = "";
List<String> words = text.split(" ");
for (var text in words) {
if (text.trim().isNotEmpty && result.length < 2) {
result += text[0].trim();
}
}
return result.trim().toUpperCase();
}