Lab 08
Lab 08
Student Name
CMSID
Semester 5th
Lesson Set Building
Applications with State Management
8
Purpose 1. To understand the concept of state management in Flutter applications.
2. To explore various state management techniques such as setState,
Provider, and GetX.
3. To build scalable and maintainable applications using state management.
Procedure 4. Students should read the Pre-lab Reading assignment before coming to the
lab.
5. Students should complete the Pre-lab Writing assignment before entering
the lab.
6. In the lab, students should complete Labs 8.1 through 8.4 in sequence.
Your instructor will give further instructions on grading and completing the
lab.
7. Students should complete the set of lab tasks before the next lab and get
them checked by their lab instructor.
Lab 8
2|Page
PRE-LAB READING ASSIGNMENT
3|Page
Common State Management Techniques in Flutter
1. setState:
o Simplest way to manage state.
o Used for widgets that rebuild themselves when the state changes.
o Ideal for small-scale state changes.
2. Provider:
o Officially recommended by Google.
o Allows sharing state across the app and provides separation of concerns.
o Useful for medium to large applications.
3. GetX:
o Lightweight, reactive state management library.
o Offers state, dependency, and route management in one package.
o Known for its simplicity and performance.
4|Page
5|Page
PRELAB WRITING ASSIGNMENT
Fill in the 1. State management in Flutter is used to manage the _______ of an app.
blanks
2. The simplest way to manage state in Flutter is by using the _______ method.
6|Page
Lab 8.2 Lab Tasks
Note: Make sure to upload the code for each task to a GitHub repository. Do not update or
change the repository after the due date. Provide the link to your GitHub repository with each
task submission.
7|Page