installDartPackages function
Runs flutter pub get
in the outputDir
.
Implementation
Future<void> installDartPackages(
Logger logger,
Directory outputDir,
) async {
final isFlutterInstalled = await Flutter.installed(logger: logger);
if (isFlutterInstalled) {
final installDependenciesProgress = logger.progress(
'Running "flutter pub get" in ${outputDir.path}',
);
await Flutter.pubGet(cwd: outputDir.path, logger: logger);
installDependenciesProgress.complete();
}
}