Is it a good practice to have multiple views per module in a flutter project using GetX Pattern?

Viewed 777

I have a flutter project using GetX library. I try to follow the GetX Pattern (more about GetX Pattern here).

My question is about code architecture. Is it considered a good practice to have multiple views inside one module?

Currently, I have a Authentication module that contains several views (login_view, register_view, forgot_password_view, etc...), like on the screen below:

folder structure with getx pattern

I find it more logical that way, but I didn't find any example of people doing the same.

The problem I have with one view per module is that I end up with a lot of modules, and it becomes difficult to navigate the folder tree when your app is getting more complex.

1 Answers

When your project is too big, it's so tough to handle. It would be good practice if you go with feature driven structure.

view
├─ auth_view
│  ├─ auth_view.dart
│  ├─ widget
│  │  ├─ email_validate_view.dart
│  │  ├─ password_validate_view.dart
├─ home_view/
├─ shop_view/
Related