generate static method

String generate({
  1. required String className,
  2. required String packageName,
})

Implementation

static String generate({
  required String className,
  required String packageName,
}) {
  final template = _template.replaceAll('%CLASS_NAME%', className.pascalCase);
  return template.replaceFirst('%PACKAGE_NAME%', packageName.snakeCase);
}