toCamelCase method

String toCamelCase()

Implementation

String toCamelCase() {
  if (this == null || this!.isEmpty) return '';
  final words = this!.split(RegExp(r'[_\s]+'));
  return words.first.toLowerCase() +
      words.skip(1).map((w) => w.capitalize()).join();
}