What does flutter pub get do?

Answer

flutter pub get reads the pubspec.yaml file and downloads all declared dependencies (and their transitive dependencies) from pub.dev, placing them in the local pub cache. It also generates the pubspec.lock file, which pins the exact versions used, ensuring consistent builds across machines and over time. You run this command after adding a new package to pubspec.yaml or after cloning a project for the first time.