toCamelCase static method

String toCamelCase(
  1. String input
)

Convert parameter name to camelCase

Implementation

static String toCamelCase(String input) {
  final words = input.split(RegExp(r'[_\-\s]+'));
  if (words.isEmpty) return input;

  final first = words.first.toLowerCase();
  final rest = words.skip(1).map(_capitalize);

  return [first, ...rest].join('');
}