App developments vedeo
## 1. What is Flutter and How to Set It Up
*Video:* [Flutter Setup &
Installation](https://youtu.be/56xvk6OHTpM?si=5HDgP8pFwHIajR80)
- Flutter is a tool from Google to build apps that run on Android and iPhone using one code
base.
- I followed this video to download and install Flutter on my computer.
- It showed me how to install Android Studio (the program for coding) and set up the
environment step-by-step.
- I ran the flutter doctor command as the video showed, and fixed small issues by pausing and
re-watching the steps.
- This made me ready to start coding.
## 2. Understanding Flutter Widgets (Building Blocks)
*Video:* [Flutter Widgets Introduction](https://youtu.be/kwqb-
6QyYt8?si=NixIArNEXyghiQxp)
- Everything in Flutter is made of widgets — like buttons, text, images, and screen layouts.
- I learned about basic widgets such as Text, Image, Button, and how to arrange them using
Row (side by side) and Column (stacked).
- The video used simple examples and showed how to change colors and fonts easily.
- It felt like building with Legos, which made it fun and easy to understand.
## 3. Learning State and How to Make Apps Interactive
*Video:* [StatefulWidgets and State Management](https://youtu.be/vx4BtrqlKCY?si=-
WwOFJgwV7yiv2zx)
- I was first confused about “state,” but the video explained it as how the app remembers
what’s happening.
- For example, if I check off a task in a to-do list, the app must remember that.
- The difference between StatelessWidget (no change) and StatefulWidget (can change)
became clear.
App developments vedeo
- The teacher gave simple examples so I could see how to update parts of the app when
needed.
# Dart https://youtu.be/fLW2vyGXOIk
1. What is a Function?
A function is a reusable block of code that performs a specific task. It helps in structuring
code and avoiding repetition.
Example:
void greet() {
print("Hello!");
}
2. Function Syntax & Types
• Basic function:
int add(int a, int b) {
return a + b;
}
• Types of functions:
- No parameter, no return: void greet() { print("Hi"); }
- With parameter, no return: void showName(String name)
- No parameter, with return: int getValue()
- With parameter and return: double area(int r) => 3.14 * r * r;
3. Optional Parameters
• Positional Optional:
void greetUser(String name, [String? city])
• Named Optional:
void greetUser({String name = 'Guest', int age = 18})
4. Arrow Functions
Short-hand functions used for simple expressions.
Example:
int square(int x) => x * x;
void hello() => print('Hello');
5. Recursive Function
App developments vedeo
A function that calls itself.
Example:
int factorial(int n) => n <= 1 ? 1 : n * factorial(n - 1);
6. Anonymous Function
Functions without a name, usually used inline.
Example:
list.forEach((item) {
print(item);
});
7. Dart Keywords and Concepts
• String: Sequence of characters. Example: String name = 'John';
• int: Integer type. Example: int age = 25;
• double: Decimal numbers. Example: double pi = 3.14;
• bool: Boolean type. Example: bool isActive = true;
• List: Collection of items. Example: List<int> nums = [1,2,3];
• Map: Key-value pair. Example: Map<String, int> marks = {'A': 90};
• var: Automatically infers data type.
• final/const: For constants.
• async/await: Used for asynchronous operations.
• Future: Handles values that will be available later.
• Stream: Handles sequence of async events over time.
• loop: for/while/do-while loops used for iteration.
• OOP: Object-Oriented Programming using classes, objects, inheritance.
• class: Blueprint of objects. class Person {...}
• void: Function that doesn't return anything.
• return: Returns a value from a function.
8. Function Inside Class
class Calculator {
int add(int a, int b) {
return a + b;
}
}