0% found this document useful (0 votes)
5 views5 pages

Lab 09

Mobile Application Development in flutter Lab Manual for NUST NBC

Uploaded by

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

Lab 09

Mobile Application Development in flutter Lab Manual for NUST NBC

Uploaded by

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

Lab # 09

Mobile Application Development


Fall 2022

Instructor Bakht Muhammad

Student Name

CMSID

Department Computer Science

Semester 5th
Lesson Set Building Applications that Require CRUD Tasks and
Communication with the Internet
9
Purpose 1. Understand the basic concepts of CRUD operations in a Flutter app.
2. Learn how to make HTTP requests using the http package.
3. Handle JSON data to interact with APIs.
4. Implement asynchronous programming concepts for network
communication.
5. Build a simple UI for CRUD operations.

Procedure 6. Students should read the Pre-lab Reading assignment before coming to the
lab.
7. Students should complete the Pre-lab Writing assignment before entering
the lab.
8. In the lab, students should complete Labs 9.1 through 9.4 in sequence.
Your instructor will give further instructions on grading and completing the
lab.
9. Students should complete the set of lab tasks before the next lab and get
them checked by their lab instructor.

Contents Pre-requisites Completion Page


Time Number

Pre-lab Reading Assignment - 20 min 3

Pre-lab Writing Assignment Pre-lab Reading 10 min 4

Lab 9

Lab 9.1 Pre-lab reading 30 min 5


-

Lab 9.2 Awareness of - 9


Lab Tasks Flutter

2|Page
PRE-LAB READING ASSIGNMENT

What is CRUD  Create: Add new data to a database or API.


 Read: Fetch and display data from a database or API.
 Update: Modify existing data.
 Delete: Remove data.

HTTP  Use the http package to perform HTTP requests (GET, POST, PUT,
Communicatio DELETE).
n in Flutter  Handle responses and parse JSON data.

JSON Parsing  JSON (JavaScript Object Notation) is a lightweight data-interchange


format.
 Use the dart:convert library to convert JSON data to Dart objects.

Asynchronous  Use Future, async, and await to handle asynchronous API calls
Programming

SQLite CRUD SQLite is a lightweight, serverless database management system widely


used for local storage in mobile applications. It is an embedded database,
meaning that it does not require a separate server to operate. SQLite is
easy to use, fast, and reliable, making it an excellent choice for offline-first
applications or apps that need simple data persistence.

Key Features of SQLite


 Serverless and self-contained.
 Supports ACID (Atomicity, Consistency, Isolation, Durability)
properties.
 Uses SQL (Structured Query Language) for querying data.
 Lightweight and efficient, with no configuration required.

Self-Study: https://medium.com/@hemant.ramphul/complete-sqlite-crud-
operations-in-flutter-6cbba8582c45

3|Page
PRELAB WRITING ASSIGNMENT

Fill in the 1. CRUD stands for _____, _____, _____, and _____.
blanks
2. A _____ is a common API format for fetching or sending data over the
internet, often structured in key-value pairs.

3. The _____ widget in Flutter is used to build parts of the UI based on the state
of a Future.

4. A REST API communicates using the _____ protocol and employs standard
HTTP methods like GET, POST, PUT, and DELETE.

5. The _____ method in Dart’s http package is used to retrieve data from a
REST API endpoint.

4|Page
Lab 9.2 Lab Tasks

1. Fetch Data: Modify the app to display a list of users instead of posts from JSONPlaceholder.
2. Create Data: Add a form to allow users to create a new post and display it in the list.
3. Update Data: Add an edit button to modify a post's title and body.
4. Delete Data: Add a delete button to remove a post from the list.

 Screenshot should be pasted here.


 GitHub Repository link.

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.

5|Page

You might also like