首页 > 解决方案 > What is the functionality of .dart_tool folder in a Flutter application?

问题描述

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

标签: flutterdart

解决方案


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).


推荐阅读