toCamelCase property
String
get
toCamelCase
Converts the string to camelCase.
Example:
print('hello_world'.toCamelCase); // helloWorld
Implementation
String get toCamelCase {
List<String> words = toSnakeCase.split('_');
if (words.isEmpty) return '';
return words[0] + words.skip(1).map((w) => w.capitalize).join();
}