toCamelCase method
Implementation
String toCamelCase() {
final replaced = this.replaceAll(" ", "_");
return replaced
.split("_")
.asMap()
.map((i, s) {
if (i == 0) {
return MapEntry(i, s[0].toLowerCase() + s.substring(1));
}
return MapEntry(i, s[0].toUpperCase() + s.substring(1));
})
.values
.toList()
.join("");
}