LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

flutter-pub

Dart package dependency manager for Flutter

TLDR

Get dependencies
$ flutter pub get
copy
Update dependencies
$ flutter pub upgrade
copy
Add package
$ flutter pub add [package_name]
copy
Remove package
$ flutter pub remove [package_name]
copy
Run build runner
$ flutter pub run build_runner build
copy

SYNOPSIS

flutter pub command [options] [arguments]

DESCRIPTION

flutter pub manages Dart package dependencies for Flutter projects. It installs, updates, and resolves packages from pub.dev, the Dart package repository.The tool reads pubspec.yaml for dependency specifications and generates pubspec.lock for reproducible builds. It handles transitive dependencies and version conflicts automatically.flutter pub enables code reuse through thousands of community packages for networking, state management, UI components, and more.

PARAMETERS

COMMAND

Operation: get, upgrade, add, remove, run, etc.
get
Install dependencies from pubspec.yaml.
upgrade
Update to latest compatible versions.
add PACKAGE
Add package to dependencies.
remove PACKAGE
Remove package from dependencies.
run SCRIPT
Run package script.
outdated
Show outdated packages.
deps
Show the dependency tree.
publish
Publish the package to pub.dev.
downgrade
Downgrade dependencies to the lowest versions allowed by pubspec.yaml.
cache
Inspect, repair, or clean the local pub package cache.
--help
Display help information.

CONFIGURATION

pubspec.yaml

Project configuration file defining dependencies, dev dependencies, and package metadata.
pubspec.lock
Generated lock file ensuring reproducible dependency versions across environments.

INSTALL

nix profile install nixpkgs#flutter
copy

CAVEATS

Version conflicts may require manual resolution. Some packages are platform-specific. Large dependency trees slow first build. flutter pub run is deprecated for executable scripts — prefer dart run (or flutter pub run only when the executable depends on the Flutter SDK).

HISTORY

flutter pub wraps the Dart pub tool for Flutter development. The pub.dev repository serves both Dart and Flutter packages, managed through the shared package specification format.

SEE ALSO

flutter(1), dart(1)

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid