What is the pubspec.yaml file in Flutter?

Answer

The pubspec.yaml file is the configuration manifest for a Flutter project. It defines the project name, version, Dart SDK constraints, and all external dependencies (packages) the app needs. It also declares assets such as images and custom fonts. After modifying pubspec.yaml, you run flutter pub get to download and install the declared packages from pub.dev.