Suppose I have a list of packages which I want to add in my flutter project. I can do the job by simply adding those packages in pubspec.yaml file and then in command line write this command flutter pub get and get all those packages in my app. But If I want to do the same thing by command line how to do that?
Like to add a single package what we do is flutter pub add xxx. What if I want to add multiple packages at the same time in project with a single command line. I have searched but did not get any clue.
Actually you can already do this using flutter pub add
For example i want to add dependecies for a project that use drift and riverpod, just run these two command instead of running separate pub add for each package.
# app dependencies
flutter pub add drift sqlite3_flutter_libs path_provider path flutter_riverpod
# dev dependencies
flutter pub add --dev drift_dev build_runner
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With