camelCase property

String? get camelCase

camelCase string Example: your name => yourName

Implementation

String? get camelCase {
  if (isEmpty) {
    return null;
  }

  List<String> separatedWords = split(RegExp(r'[!@#<>?":`~;[\]\\|=+)(*&^%-\s_]+'));
  String newString = '';

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

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