Author
Incresco Team
Incresco Editorial
Subject Matter Expert
Content reviewed by Incresco's AI & product specialists.
Published
2019-10-09

As soon as I started Flutter, I was amazed with the simplicity it brings to the app development. Flutter has almost everything I can imagine, it got create-flutter starter kit, hot reloading, unit testing framework and lots and lots of widgets.
Thatβs great, I have developed a βHello world!β, everything looked cool and fast. This is good, how about building a real application with more complex functionality, state maintenance, connecting to Firestore, making api request, custom theme etc. OK Letβs do that, lets pull-up main.dart file and start writing code.
Wait a sec, should I put all my stuff in main.dart file? Certainly not. We need to have clear app structure to make the application more scalable and most importantly makes it easy and clear for the fellow team members to understand well.
Letβs see how to organize files and folders.

index.dart file:
This file is to hold all my packages, which are required in other classes. I have imported this ONE file in all my other classes and widgets.

images: Folder to hold the images/assets used in the project.
screens: This folder contains the screens which will be configured in the routes in the main.dart file.
providers: Iβm using provider pattern for this application for state management, so all the provider files goes to the providers folder with the file naming convention βuser_provider.dartβ as an example.
models: Providers will use these models, sort of mapped with my entity in database.
services: This folder is for backend operation like connecting to the Firestore or invoking HTTP calls etc.
utilities: All the common items goes in here, example., constants used in the project.
Coming from a non-mobile development background, this structure helps me with faster development. Of course there are other ways to organize better, please leave a comment if you have suggestions.
If you have scrolled this far, thanks for reading :)
Related Articles
Explore more perspectives on AI strategy, product development, and engineering.
2023-02-26
Animating the Web with Lottie: Best Practices for Optimization
The article suggests using the useEffect hook to control animation rendering, the useMemo hook to optimize rendering, and the useLazyLottie hook to lazy-load animati...
2025-01-21
2017-05-30
Creating a simple Chatbot in Salesforce lightning using API.AI in less than 60 mins
In this article, I have explained on how to build your own Chatbot in API.AI and use it in Salesforce lightning.
Ready to Turn Ideas into a Roadmap?
If this article sparked opportunities for your product or organisation, let's turn them into a concrete plan with timelines and outcomes.
Schedule a Consultation