Flutter 项目具有标准的结构——包含 Dart 代码、平台特定代码、资源和配置的目录。理解结构和关键文件(特别是 pubspec.yaml 和 lib/)对于在 Flutter 应用中导航和构建是必需的。
关键目录和文件
my_app/
lib/ → your DART CODE lives here (the heart of the app)
main.dart → the ENTRY POINT (the main() function; app starts here)
pubspec.yaml → project config: DEPENDENCIES, assets, metadata (very important)
android/ → Android-specific native project/config
ios/ → iOS-specific native project/config
web/ windows/ etc. → other platform folders
test/ → tests
assets/ → images, fonts, etc. (declared in pubspec.yaml)
