Reputation: 6595
I'm building a Dart framework called Modular for backend development and this framework has a installer for convenience. At the end of the installation, I'd like to install all dependancies in the generated pubspec.yaml
file. How would I do this? Thank you
Upvotes: 2
Views: 101
Reputation: 657466
import 'dart:io';
void main() {
Process.run('pub', ['get'],
runInShell: true,
workingDirectory: 'dirWherePubspec.yaml_is')
.then((ProcessResult results) {
// ...
});
}
or alternatively Process.start(...)
Upvotes: 3