【问题标题】:What project structure should I use in Flutter?我应该在 Flutter 中使用什么项目结构?
【发布时间】:2021-09-20 12:14:28
【问题描述】:

我是 Flutter 的新手,我只想知道我应该考虑使用哪些项目结构。我习惯了MVC,如果有类似的东西对我来说会更好。

【问题讨论】:

    标签: flutter dart project-structure


    【解决方案1】:

    您将尝试功能驱动的开发。和mvc差不多。

      ├── lib
      |   ├── Feature
      │   │   ├── controller
      │   │   │   └── post_controller.dart  
      |   |   |  
      |   |   └── models
      |   |   |   └── models.dart*
      |   |   |   └── post.dart
      │   │   └── view
      │   │   |   ├── posts_page.dart
      │   │   |   └── posts_list.dart
      |   |   |   └── view.dart*
      |   |   └── widgets
      |   |   |   └── bottom_loader.dart
      |   |   |   └── post_list_item.dart
      |   |   |   └── widgets.dart*
      │   │   ├── posts.dart*
      │   ├── app.dart
      │   └── main.dart
      ├── pubspec.lock
      ├── pubspec.yaml
    

    更多关于FDD

    【讨论】:

      【解决方案2】:

      我在一个项目中使用过 Reso Coder 的 DDD 布局,发现还是挺满意的:https://resocoder.com/2020/03/09/flutter-firebase-ddd-course-1-domain-driven-design-principles/#t-1632174466906

      【讨论】:

        猜你喜欢
        • 2011-02-12
        • 2011-12-12
        • 2011-10-24
        • 2017-05-11
        • 2011-10-23
        • 2015-12-19
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多