首页 > 解决方案 > 我应该在 Flutter 中使用什么项目结构?

问题描述

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

标签: flutterdartproject-structure

解决方案


您将尝试功能驱动的开发。它几乎与 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的更多信息


推荐阅读