snippetbashTip
flutter pub — Flutter's package manager. Note: Packages are available on <https://pub.dev>. See also: `flutter`. M
Viewed 0 times
commandflutter pubnotecliflutterpackagemanagerpackages
Problem
How to use the
flutter pub command: Flutter's package manager. Note: Packages are available on <https://pub.dev>. See also: flutter. More information: <https://docs.flutter.dev/packages-and-plugins/using-packages>.Solution
flutter pub — Flutter's package manager. Note: Packages are available on <https://pub.dev>. See also: flutter. More information: <https://docs.flutter.dev/packages-and-plugins/using-packages>.Download/Update all packages specified in
pubspec.yaml:flutter pub getAdd a package dependency to an app:
flutter pub add {{package1 package2 ...}}Remove a package dependency from an app:
flutter pub remove {{package1 package2 ...}}Upgrade to the highest version of a package that is allowed by
pubspec.yaml:flutter pub upgrade {{package}}Code Snippets
Download/Update all packages specified in `pubspec.yaml`
flutter pub getAdd a package dependency to an app
flutter pub add {{package1 package2 ...}}Remove a package dependency from an app
flutter pub remove {{package1 package2 ...}}Upgrade to the highest version of a package that is allowed by `pubspec.yaml`
flutter pub upgrade {{package}}Context
tldr-pages: common/flutter pub
Revisions (0)
No revisions yet.