What project structure should I use in Flutter?

Issue

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.

Solution

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

Answered By – Jahidul Islam

Leave a Comment