useTemplate method

Future<void> useTemplate(
  1. String templateName,
  2. String newName
)

Use a template by templateName and create a new instance with newName.

Implementation

Future<void> useTemplate(String templateName, String newName) async {
  Notify.message('creatinginstance-text'.i18n([newName]), loading: true);
  var result = await WSLApi().import(newName, getInstancePath(newName).path,
      getTemplateFilePath(templateName));
  Notify.message(result);
}