Final Exam Note Application Development Exam
Final Exam Note Application Development Exam
What is Flutter?
Flutter is an open-source UI toolkit developed by Google.
It allows developers to build beautiful, natively compiled apps
for mobile, web, and desktop — all from a single codebase.
What is Dart?
Dart is the programming language used to build Flutter apps.
It is optimized for UI development with features like:
Hot reload
Strong typing
Asynchronous programming
Types of Widgets:
StatelessWidget – UI does not change (static).
1
StatefulWidget – UI changes dynamically based on state or
user input.
Difference:
Stateless → build() runs once.
Stateful → uses setState() to update UI.
Common Widgets:
Text – displays text.
TextField – input field for typing.
Column / Row – vertical and horizontal layouts.
Stack – overlays widgets on top of each other.
Navigation in Flutter
2
Used for better organization in large apps.
Example:
dart
CopyEdit
routes: {
'/home': (context) => HomeScreen(),
'/profile': (context) => ProfileScreen(),
}
Hot Reload:
Allows developers to see code changes instantly without
restarting the app.
Saves time and improves testing and debugging.
flutter doctor:
Checks if all tools and dependencies are correctly installed.
Command:
bash
CopyEdit
flutter doctor
TextEditingController:
3
Used to manage the input from a TextField.
Example:
dart
CopyEdit
TextEditingController nameController =
TextEditingController();
Button Example:
dart
CopyEdit
ElevatedButton(
onPressed: () {
print("Hello");
},
child: Text("Click Me"),
)
Key Features:
Takes user input for height and weight using TextField.
Performs BMI calculation:
BMI = weight / (height * height)
Displays result on a new screen using Navigator.
4
Advantages of Flutter