validatePackageName method

bool validatePackageName(
  1. String name
)

Implementation

bool validatePackageName(String name) {
  final Match? match = RegExp('[a-z_][a-z0-9_]*').matchAsPrefix(name);
  return match != null && match.end == name.length && !dartKeywords.contains(name);
}