Anatomy

Learn about various files and folders of a Flutter Project and try to understand what they do.

Android

You’ll find a folder named “android” in the project directory. This folder is responsible for running the app on Android devices. Here the Flutter framework does the heavy lifting to transform your Dart code to native Java/Kotlin code.

iOS

Below the “android” folder, you have the “ios” folder, which is responsible for running the app on iOS devices like iPhone or iPad.

The lib folder

Below the “ios” folder, you have the “lib” folder where you will write all our Dart codes using Flutter libraries. So this is the place where you’ll be developing 90% of the time. Currently, you’ll see a main.dart file where our demo counter app will be written, so the Flutter framework will start running its code from the main function of this particular file.

The pubspec.yaml file

Under the “my_todo_app” folder, you’ll see a pubspec.yaml file. In this yaml file, you’ll write our third-party packages, which you want as a dependency for our Flutter Project. When you run this file by typing the following command, Flutter will install those dependencies:

flutter pub get

You’ll learn how to add a dependency later in your course. Pubspec.yaml is also used to manage our assets like images, fonts, etc.

Get hands-on with 1400+ tech skills courses.