toPascalCase function

String toPascalCase(
  1. String s
)

Implementation

String toPascalCase(String s) =>
    s.split(RegExp(r'[_\-]')).map((w) => w.isEmpty ? '' : w[0].toUpperCase() + w.substring(1)).join('');