Deep Dive Into The Pubspec.yaml File
Whether we are starting a new Flutter project for web, mobile or desktop, there are two thing that will be common in all projects: the pubspec.yaml
and pubspec.lock
files. In this article we will explore the pubspec.yaml
file - what it is and what we can do with it.
The Pubspec.yaml File
When we create a new Flutter Project, we usually have the following file tree:
But what is exactly inside the pubspec.yaml
file? Let's examine it:
As we can see, the pubspec.yaml
file is divided into different sections, let's dive deep into each one.
General information — The Metadata
At the top of the file we see the name
. This field dictates the package name, and also how we will import files inside this…