flutterPubGet method

Future<bool> flutterPubGet(
  1. String projectPath
)

Run flutter pub get in a project

Implementation

Future<bool> flutterPubGet(String projectPath) async {
  info('Getting dependencies for: ${p.basename(projectPath)}');

  final ProcessResult? result = await _runner.runWithRetry(
    'flutter',
    <String>['pub', 'get'],
    workingDirectory: projectPath,
    operationName: 'flutter pub get (${p.basename(projectPath)})',
  );

  return result != null && result.success;
}