camelCase function

String camelCase(
  1. String value
)

Converts a string to camelCase.

Example: camelCase("hello-world_out there") returns "helloWorldOutThere".

Implementation

String camelCase(String value) {
  return value
      .split(RegExp(r'[-_]|\s'))
      .map((word) => capitalize(word))
      .join('');
}