replaceVars function

String replaceVars(
  1. String content,
  2. String name
)

Implementation

String replaceVars(String content, String name) {
  return content
      .replaceAll('@view', '${name.pascalCase}View')
      .replaceAll('@screen', '${name.pascalCase}Screen')
      .replaceAll('@controller', '${name.pascalCase}Controller')
      .replaceAll('@binding', '${name.pascalCase}Binding')
      .replaceAll('@import', PubspecUtils.getPackageImport)
      .replaceAll('@package', PubspecUtils.projectName!);
}