Home > OS >  What project structure should I use in Flutter?
What project structure should I use in Flutter?

Time:09-22

I'm new into Flutter and I just want to know what are the project structures that I should consider using. I'm used to MVC, if there's something similar will be better for me.

CodePudding user response:

You will try feature-driven development. It's almost similar as 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

For more about FDD

CodePudding user response:

I have used Reso Coder's DDD layout on a project, and found it to be quite satisfying: https://resocoder.com/2020/03/09/flutter-firebase-ddd-course-1-domain-driven-design-principles/#t-1632174466906

  • Related