2. Flutter Project Structure

Flutter Project Structure

As always, I’ll be very straightforward and try to keep the article short, simple, and very precise. So that in no time you can learn the things. 😉

To Fully understand flutter, we need to understand its project structure, So we can know which file and folder do what, and why they exist.

The Files and Folders that we mainly use

Flutter Default Project Structure

This section contains files and folders that we mainly used while developing apps.

Android and iOS directories hold a complete Android and iOS app respectively, with all their respective files. Whenever you want to implement any platform-specific feature you can implement it by going in these directories.

The lib directory holds all your dart code used to run your app.

pubspec.yaml is a special file. It contains your app name, description, SDK version, dependencies, and other important stuff.

The test directory is for writing tests in dart similar to instrumented tests in Android using Espresso.

The Files and Folder that we mainly don’t touch

  • In 99.99% of cases, we don’t touch these files. As manually editing them can destroy the entire project (expect .gitignore, and README.md 😉).
  • .idea directory holds all project-specific settings. Settings are stored mainly in the form of XML files. We normally don’t touch these folders.
  • The .gitignore file is a text file that tells Git, which files or folders to ignore in a project.
  • .metadata, .packages, pubspec.lock are generated by flutter itself. These files are used by the framework itself for internal usages. We normally don’t touch them. As they perform internal tasks.
  • README.md is a markdown file mainly used in version control like Git for representing information of other files.

That’s it for project structure guys. Feel free to let me know if I miss something. I’ll love to learn it from you. Also, Check out the dart and flutter section to learn more about them in our publication.

Till Then keep loving your work and keep working lovely. And I’ll surely catch you up in the next article. 😊

--

--

Harshu Inc. is a Missionary Tech Company that aims to create solutions via technology for Humanity.

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
Harshu Incorporation

Harshu Inc. is a Missionary Tech Company that aims to create solutions via technology for Humanity.