extensionClassName function
Chooses the name of the Dart class holding top-level extensions.
Implementation
String extensionClassName(
FileDescriptorProto descriptor, Set<String> usedNames) {
final s = avoidInitialUnderscore(
legalDartIdentifier(_fileNameWithoutExtension(descriptor)));
final candidate = '${s[0].toUpperCase()}${s.substring(1)}';
return disambiguateName(candidate, usedNames, extensionSuffixes());
}