0% found this document useful (0 votes)
8 views11 pages

Chapter 2 - Flutter & Dart Basics (Part 3)

The document discusses the project structure of a Flutter application, including the main folders like lib, test, android and ios. It explains that the lib folder contains the core app logic and UI code, the test folder holds automated tests, and the android and ios folders contain platform-specific configurations. It also mentions the pubspec.yaml file is used to manage dependencies.

Uploaded by

dxrshx101
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views11 pages

Chapter 2 - Flutter & Dart Basics (Part 3)

The document discusses the project structure of a Flutter application, including the main folders like lib, test, android and ios. It explains that the lib folder contains the core app logic and UI code, the test folder holds automated tests, and the android and ios folders contain platform-specific configurations. It also mentions the pubspec.yaml file is used to manage dependencies.

Uploaded by

dxrshx101
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

Flutter &

Dart Fundamentals
(Part 3 –
Project Structure)
6002CEM
Mobile App Development
Flutter & Dart Learning Steps

Install Android Studio with Flutter to prepare for


building apps.

Understanding the Flutter Architecture

Learn Flutter & Dart Basics (This Chapter)

Create your first Flutter app

Create other Flutter apps


Learning Outcomes

• At the end of this lecture, you should be able to:


• Explain a Flutter Folder Structure
Folder Structure of a Flutter Project
• A new Flutter Project folder will typically look like this:

We will explore the following files / folder:


1. lib folder
2. test folder
3. android / ios folder
4. pubspec.yaml file
lib Folder

The lib folder is the most


important part of your Flutter
project. It houses the core
logic and user interface of
your app. Inside the lib folder,
you'll find files such as:
• main.dart: This file serves
as the entry point of your
app. It contains the main
function and initializes the
Flutter app.
lib Folder
In this folder, you can create sub packages and
organise the files in your mobile app project.

There are 2 main concerns in organizing your mobile


app:
1. Where should I put this code (i.e. while file)?
2. Where should I place this file (i.e. which folder)?

We will be studying the solutions for this in the future


topics.
test Folder
The test folder is where you write
automated tests to ensure the quality
and stability of your app.

Flutter provides a powerful testing


framework that allows you to write
unit tests, widget tests, and
integration tests.

Organizing your tests within this


folder helps keep your tests separate
from the production code.
android and ios Folders: Platform-Specific Configuration
The android and ios folders contain platform-
specific files and configurations for Android
and iOS, respectively. These folders are auto-
generated when you create a Flutter project
and are responsible for handling platform-
specific code, permissions, dependencies,
and other configurations.
pubspec.yaml File – Managing Dependencies

A metadata file that declares


the package name, version,
author, and so on.
pubspec.yaml File – Managing Dependencies

The pubspec.yaml file is the control center for managing your


app's dependencies. Here, you specify the packages and
libraries your app relies on.

Flutter uses the Dart package manager, Pub, to automatically


fetch and include the specified dependencies in your project.
Other Configuration Files

Apart from the folders mentioned


above, you might also come
across other configuration files
such as analysis_options.yaml for
static code analysis rules,
.gitignore for specifying files to
be ignored by Git, and more.

You might also like