13

I am new to flutter and I encountered this folder .dart_tool. I am able to find the uses of each folder and files, except this one. I want to know what purpose does this folder serves.

enter image description here

Sumit Singh
  • 487
  • 5
  • 19

3 Answers3

8

As @Shri noted in his answer, the Flutter documentation says:

The .dart_tool directory, which is new in Dart 2, is used by pub and other tools. It replaces the .pub directory as of the 2.0.0-dev.32.0 SDK release.

However, I would also add that it contains a package_config.json file that specifies packages' locations and versions (which could cause a problem that I addressed in this answer), as well as Flutter build caches (in a flutter_build directory).

Michal Karbownik
  • 1,138
  • 14
  • 28
3

From the documentation,

The .dart_tool directory, which is new in Dart 2, is used by pub and other tools. It replaces the .pub directory as of the 2.0.0-dev.32.0 SDK release.

Shri Hari L
  • 4,551
  • 2
  • 6
  • 18
2

Anyone who wonders what is pub, It is the package repository for flutter and Dart Applications.

A Package Repository is a place where all the packages (like libraries, jars) are stored in the internet (once downloaded they may get stored in the local machine and then we call it a local repository).

Ashan Priyadarshana
  • 3,119
  • 3
  • 29
  • 34