installFlutterPackages function

Future<void> installFlutterPackages(
  1. Logger logger,
  2. Directory outputDir, {
  3. bool recursive = false,
})

Runs flutter packages get in the outputDir.

Implementation

Future<void> installFlutterPackages(
  Logger logger,
  Directory outputDir, {
  bool recursive = false,
}) async {
  final isFlutterInstalled = await Flutter.installed(logger: logger);
  if (isFlutterInstalled) {
    await Flutter.packagesGet(
      cwd: outputDir.path,
      recursive: recursive,
      logger: logger,
    );
  }
}