Getting Started flutter? Let's know the Purpose Default files in Flutter Project.
Tags: Flutter, Flutter Widget, Getting Started, Visual Studio Code, Flutter Ui

Weather you are new to flutter or experienced, you may have think about the defaults files in flutter project. If I am right let’s read the article.

Simply put, to make a basic app, you only need to focus on the “lib” directory and the “pubspec.yaml” file.

“But what are those other files? what is there need?”

Let’s see one by one…

android and iOS

The “android” and “ios” directories hold a complete Android and iOS app respectively with all their respective files. For example, if you go into “android” you’ll find a complete Android project including a manifest.xml, activities, Gradle files, etc. If you want to write any platform-specific code or add permissions, you’ll have to edit these projects.

lib

The “lib” directory holds all your .dart files and most if not all your code will rest over here. The “lib” directory holds all the main dart code used to run your app. The “main.dart” is kind of like an entry point for the flutter application further when do we do start creating multi-screen applications following a certain design pattern we will have to create more files

test

Test folder as the name suggests this folder is used to store and manage the testing code for the application just like the library folder. The “test” directory is for writing tests in Dart similar to Instrumented tests in Android using Espresso. Tests help you verify a component works without actually having to do it yourself. There’s a sample test written for you which you can run and see how it works out. The syntax is simple enough to try out a few yourself, but we’ll cover this in a later article.

Now these are particularly configuration files which are used by the IDE of your choice and language tools now let us explain this one by one the

.gitignor

This file is a hidden file, the IDE uses to store the list of files which need to be ignored when source code is uploaded or checked into any get versioning system like for example GitHub.

.metadeta

This file is also a hidden file which is used by IDE to drag the properties of the particular flutter project. It saves the data related to the project.

.packages

The “.packages” file is one of the package managers which managed components inside the IDE let’s say for example in case of “.package” manager calls pub and this hidden file is used by the pub to manage.

pubspec.lock

It is just like the “.packages” this file is also used by pub package manager in order to get the concrete versions and other identifying information.

pubspec.yaml

Here, we can add third-party libraries. The “pubspec.yaml” file contains all of the packages you’ve imported. (For Android Developers: This is equivalent to your Gradle files where you add in dependencies)

purpose_of_file.iml

Our project name .iml file which is used by the editor engine to get the configuration of Java module which is used by this project moving on to

README.MD

The final file is the readme.MD this is a markdown file and by as the name suggests it’s a readme file which can contain any information that you would want to mention about the project. It is an optional file.

so this is particular this is mainly the basic information related to flutter project.