isValidFeatureName function

bool isValidFeatureName(
  1. String name
)

Returns whether name is a valid snake_case feature identifier (starts with a letter and contains only lowercase letters, digits, and underscores).

Implementation

bool isValidFeatureName(String name) {
  return RegExp(r'^[a-z][a-z0-9_]*$').hasMatch(name);
}