File Structure in Flutter!

  • Clean and easy to understand
  • Independent of other functionalities
  • Scalable

Satisfaction to point 1: Clean and easy to understand

This folder structure as you can see is pretty clean and easy to understand as it doesn’t have much complexity. So even a beginner can view the code structure easily. Also, such easy project structure help us to trace the bug quickly and solve them.

Satisfaction to point 2: Independent of other functionalities

As you can see, each functionality has it’s own folder and hence they are totally independent of each other.

Satisfaction to point 3: Scalable

Let’s say now you wish to add any other functionality in our chat app, for example, you wish to have now a list of chats or a list of all the contacts of your friends, so you can simply create a new folder named chat_list or contact_list and create the same folder structure. Hence, you can say this project structure is scalable as adding new feature doesn’t require you to change the existing functionality files.

Don’t forget to connect with me on:

Don’t stop, until you are breathing!💙
- Abhishek Doshi

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Abhishek Doshi

Abhishek Doshi

1.92K Followers

Google Developer Expert — Dart, Flutter & Firebase 💙💛