搜索插件、代码仓与 APP 分类

插件详情v1.0.1

project_structure_generator

项目结构生成器

AndroidiOSWebmacOSWindowsLinux
近 30 天下载
9
喜欢数
1
Pub 分数
125

安装插件

flutter pub add project_structure_generator

插件介绍

基于插件公开信息、社区数据与项目使用情况整理的选型参考。

一个 Flutter 包,可自动创建有组织的项目结构,帮助开发者在多个平台上建立一致且可扩展的目录布局。它支持 Android、iOS、Web、macOS、Windows 和 Linux,确保代码组织的一致性。该生成器通过提供预定义模板,简化了新成员的入职流程,并减少了设置时间。它可通过简单的命令行添加与 Flutter 的 pub 系统无缝集成。

适合场景

  • 快速项目初始化
  • 团队级代码标准化
  • 跨平台开发设置
  • 引导新开发人员
  • 保持项目布局的一致性

主要特点

  • 基于模板的结构生成
  • 多平台支持
  • 轻松集成 CLI
  • 可自定义的目录模板
  • 自动文件夹创建

适合对象

  • Flutter 团队
  • 新的 Flutter 项目
  • 大规模应用
  • 开发工作流自动化
  • 敏捷开发环境

使用建议

  • 需要手动配置模板
  • 可能与现有文件冲突
  • 仅限目录结构
  • 不适合复杂的构建逻辑
  • 依赖于正确的初始设置

原始 README

以下为关联源码仓库的 README 原文快照,最新内容请访问源码仓库。

If you want to convert folders to .json file, for example

flutter pub run project_structure_generator:from_folders -root lib/ -output lib/output.json

-root - root dir

-output - output dir for .json file

If you want to convert json to folders, for example

flutter pub run project_structure_generator:to_folders -json lib/structure.json -output lib/

-output - output dir

-json - input json dir

See folder_structure.json in root path of project for example

Here is example json:

{
  "name": "project_lib",
  "type": "directory",
  "children": [
    {
      "name": "core",
      "type": "directory",
      "children": [
        {
          "name": "file.txt",
          "type": "file"
        },
        {
          "name": "file2.txt",
          "type": "file"
        }
      ]
    }
  ]
}

Will be generated

Alt Text

所属分类

源码仓库

使用此插件的项目

暂无相关数据。