camelCase method

String camelCase(
  1. String value
)

Camelcase string Example: your name => yourName

Implementation

static String camelCase(String value) {
  if (isNullOrBlank(value)) {
    return null;
  }

  final separatedWords = value.split(' ');
  var newString = '';

  for (final word in separatedWords) {
    newString += word[0].toUpperCase() + word.substring(1).toLowerCase();
  }

  return newString[0].toLowerCase() + newString.substring(1);
}