runSubstitution method

FileContents? runSubstitution(
  1. Map<String?, String?>? parameters
)

Implementation

FileContents runSubstitution(Map<String, String> parameters) {
  if (path == 'pubspec.yaml' && parameters['author'] == '<your name>') {
    parameters = Map.from(parameters);
    parameters['author'] = 'Your Name';
  }

  final newPath = substituteVars(path, parameters);
  final newContents = _createContent(parameters);

  return FileContents(newPath, newContents);
}