toPascalCase static method

String toPascalCase(
  1. String text
)

Converts string to PascalCase.

Implementation

static String toPascalCase(String text) {
  final words = _splitIntoWords(text);
  return words.map((w) => w[0].toUpperCase() + w.substring(1).toLowerCase()).join('');
}