pubGet method

Future<void> pubGet({
  1. required HookContext context,
  2. required String projectPath,
})

Run Flutter pub get in a directory

context - The Mason hook context projectPath - Path to the Flutter project

Implementation

Future<void> pubGet({
  required HookContext context,
  required String projectPath,
}) =>
    trackOperation(
      context,
      startMessage: 'Running flutter pub get',
      endMessage: 'Dependencies updated successfully',
      operation: () => Process.run(
        'flutter',
        ['pub', 'get'],
        workingDirectory: projectPath,
        runInShell: true,
      ),
    );