dart pub add <package>
Add a dependency to pubspec.yaml
Arguments
Name | Description |
---|
package | Dart pub package name |
Options
Name | Description |
---|
-h, --help | Print this usage information |
-d, --dev | Adds package to the development dependencies instead |
--git-url | Git URL of the package |
--git-ref | Git branch or commit to be retrieved |
--git-path | Path of git package in repository |
--hosted-url | URL of package host server |
--path | Local path |
--sdk | SDK source for package |
--offline | Use cached packages instead of accessing the network |
--no-offline | Do not use cached packages instead of accessing the network |
-n, --dry-run | Report what dependencies would change but don't change any |
--precompile | Precompile executables in immediate dependencies |
--no-precompile | Do not precompile executables in immediate dependencies |