toCamelCase function

String toCamelCase(
  1. String input
)

Converts the string to camel case.

Implementation

String toCamelCase(String input) {
  return input.split(' ').map((word) {
    return word[0].toUpperCase() + word.substring(1).toLowerCase();
  }).join('');
}