addAsTitle static method
Concatenates strings and converts to title case.
Implementation
static String addAsTitle(String a, String b) {
final result = '$a $b';
return result
.split(' ')
.map((word) => word.isNotEmpty
? '${word[0].toUpperCase()}${word.substring(1).toLowerCase()}'
: word)
.join(' ');
}