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

Graduation Class

The document provides an overview of advanced concepts in Flutter development, including Firebase as a Backend-as-a-Service, Bloc for state management, and local storage options like SQFlite and Hive. It outlines suggested learning roadmaps for cloud databases, state management, storage solutions, and testing. Additionally, it includes API details for accessing movie, weather, and dictionary data.

Uploaded by

Steve Tyga
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 views14 pages

Graduation Class

The document provides an overview of advanced concepts in Flutter development, including Firebase as a Backend-as-a-Service, Bloc for state management, and local storage options like SQFlite and Hive. It outlines suggested learning roadmaps for cloud databases, state management, storage solutions, and testing. Additionally, it includes API details for accessing movie, weather, and dictionary data.

Uploaded by

Steve Tyga
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/ 14

NEXT STEP

ADVANCED CONCEPTS

GovindDev | Flutter Dev | Kan Myint Htun


Firebase
What is Firebase?

A Backend-as-a-Service (BaaS) provided by Google.

Offers real-time database, Firestore, authentication, cloud storage,

and more.

CLOUD
 Use Cases in Flutter


DATABASE Store real-time user data (e.g., chat apps, user profiles)
Manage user authentication (Google, email/password).

Tools to Learn
Firebase Realtime Databas
Firebase Authenticatio
Firestore (NoSQL Database)

GovindDev | Flutter Dev | Kan Myint Htun


GovindDev | Flutter Dev | Kan Myint Htun
Advanced State Management (Bloc)
What is Bloc
Bloc (Business Logic Component) is a state management library
for managing app logic and state in a structured way
It uses Streams to handle events and emit states.

Why Use Bloc


BLOC Ensures scalability in large apps
Keeps UI code separate from business logic
Makes state predictable and testable.

Bloc Structure
Event: User actions or app lifecycle events
State: Represents the app’s state at any point in time
Bloc: Handles events and emits states.

GovindDev | Flutter Dev | Kan Myint Htun


Local Storage (SQFlite, Hive)
What is SQFlite
A Flutter plugin for SQLite, a relational database.

Use Cases
Store structured data (e.g., users, orders)
Perform SQL queries directly.

STORAGE Example Code:

final database = openDatabase(

'app.db',

onCreate: (db, version) {

return db.execute(

'CREATE TABLE users(id INTEGER PRIMARY KEY, name TEXT, age INTEGER)',

);

},

version: 1,

);

Future<void> insertUser() async {

final db = await database;

await db.insert('users', {'id': 1, 'name': 'John Doe', 'age': 25});

}
GovindDev | Flutter Dev | Kan Myint Htun
Hive
What is Hive
A lightweight and high-performance NoSQL database for Flutter.

Why Use Hive


Faster than SQFlite for small datasets
No need to define schemas like in SQLite.

STORAGE Example: Storing Data in Hive

void addData() async {

var box = await Hive.openBox('myBox');

box.put('name', 'John Doe');

print(box.get('name')); // Output: John Doe

GovindDev | Flutter Dev | Kan Myint Htun


Suggested Roadmap for Advanced
Learning
Cloud Databases
Start with Firebase for quick backend setup
Explore Supabase for SQL-based needs.

State Management
ROADMAP Practice Bloc for managing complex app states
Learn about Provider and Riverpod for simpler cases.

Storage Solutions
Use Hive for fast key-value storage
Use SQFlite for relational database needs.

Testing
Learn to write tests using Flutter’s testing framework.

GovindDev | Flutter Dev | Kan Myint Htun


GovindDev | Flutter Dev | Kan Myint Htun
GovindDev | Flutter Dev | Kan Myint Htun
MOVIE API
API_KEY: "7df1d448f9143917711eeeadf2fc7c48"

[Prefer Your API KEY]

BASE_URL: "https://api.themoviedb.org/3/";

ENDPOINT: "movie/{$type}"


MOVIE API TYPES


Now Playin
Popular

Top Rate
Upcoming

example uri :

https://api.themoviedb.org/3/movie/popular api_key=7df1d448f9143917711eeeadf2fc7c48

GovindDev | Flutter Dev | Kan Myint Htun


GovindDev | Flutter Dev | Kan Myint Htun
WEATHER API
API_KEY: "411e489d2572547040190606d08d8162"

[Prefer Your API KEY]

BASE_URL: "https://api.openweathermap.org"

ENDPOINT: "/data/2.5/{$type}"


WEATHER TYPES
weathe
forecast

example uri :

https://api.openweathermap.org/data/2.5/weather?
q=Mandalay&appid=411e489d2572547040190606d08d8162&units=metric

GovindDev | Flutter Dev | Kan Myint Htun


GovindDev | Flutter Dev | Kan Myint Htun
DICTIONARY API
BASE_URL: "https://api.dictionaryapi.dev"

ENDPOINT: "api/v2/entries/en/{$your_word}"


YOUR WORD
word (e.g: hi, genetics,....)

DICTIONARY example uri :

https://api.dictionaryapi.dev/api/v2/entries/en/hi

GovindDev | Flutter Dev | Kan Myint Htun

You might also like