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.
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).
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.
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).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With