featureName static method

String? featureName(
  1. String input
)

Implementation

static String? featureName(String input) {
  final trimmed = StringUtils.toSnakeCase(input.trim());
  if (trimmed.isEmpty) return 'Feature name cannot be empty.';
  if (!StringUtils.isValidPackageName(trimmed)) {
    return 'Invalid feature name "$input". '
        'Use lowercase letters, numbers, and underscores. '
        'Example: user_profile';
  }
  return null;
}