toScreamingSnakeCase function
Converts string to SCREAMING_SNAKE_CASE.
Implementation
String toScreamingSnakeCase(String string) {
return string
.replaceAllMapped(
RegExp(r'(?<=[a-z])[A-Z]'), (Match m) => '_${m.group(0)}')
.toUpperCase();
}