toCamelCase method
Converts a string to camel case.
input
is the string to be converted.
Implementation
String toCamelCase(String input) {
return input.split('_').map((word) {
if (word.isEmpty) {
return '';
}
return word[0].toUpperCase() + word.substring(1);
}).join('');
}