Caching data with BLOC & HIVE in FLUTTER, Caching API Data Using HIVE DataBase, Flutter Offline Mode

preview_player
Показать описание
This tutorial explores caching API call data in Flutter using BLOC and Hive. It follows a three-tier architecture with a service locator for easy access to class instances. Along the way, it covers error handling, interface class creation, and more. Stick around till the end for a comprehensive learning experience!

🔹 Topic Covered:
1️⃣ Three-tier architecture
2️⃣ Repository Pattern
3️⃣ Structured and Type-Safe Error Handling
4️⃣ Working with different data sources (local and remote)
5️⃣ Working with Bloc classes
6️⃣ Interface Classes
7️⃣ Service locator with Get_it (dependency injection)
8️⃣ Required Helpers, Utilities, Extensions, etc.
9️⃣ API Calling
🔟 Creating a Hive Model Object
1️⃣1️⃣ Create, read, and update operations for the database
1️⃣2️⃣ Bloc widgets, BLOCProvider, BlocConsumer, BlocListener, etc.
1️⃣3️⃣ Working with Database Services
1️⃣4️⃣ Connection checker
1️⃣5️⃣ Custom Alerts, Custom Image Viewer, and Custom Loading Widget
1️⃣6️⃣ Pull-to-Refresh Feature
1️⃣7️⃣ Designing a Transparent, Sleek, and Modern Bottom Navigation Bar
And much more...

📌 Get the Source Code:

⚡ Subscribe for more content:
ProgrammingWithFlexz: @ProgrammingWithFlexZ

📱 Discover a wealth of Flutter resources!

💖 Grateful for Your Support!
Your encouragement fuels my journey! Remember to like and subscribe for fresh content. Let's code, learn, and thrive together! 🧡

If you find it valuable and wish to endorse my work, why not treat me to a coffee? ☕️ Your support truly fuels my endeavors!

🔊 License:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Music provided by TheRelaxedMovement.
© Henry Keate t/a TheRelaxedMovement. All Rights Reserved
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

#flutter #flutterdev #bloc #hive #offlinemode #fluttercaching #flutterdatabase #mobiledev #appdevelopment #dart #blocpattern #getx #dependencyinjection #api #customwidgets #uiux #navigationbar

📚 Chapters:
⌨️ (00:00:00) Let's Get Started: Project Introduction
⌨️ (00:01:26) Displaying Previously Utilized Packages for the Project
⌨️ (00:01:47) Establishing the Configuration Folder and Crafting Corresponding Files (API Endpoints, App Themes)
⌨️ (00:03:00) Creating the Core Folder: Centralizing Common Files for the Entire Project (Helpers, Utilities, Extensions, etc.)
⌨️ (00:03:04) Setting Up the Feature Folder
⌨️ (00:03:08) Structuring the Home Feature (Data Sources, Models, Presentation Layers - View, Bloc, Widgets, Repository)
⌨️ (00:03:23) Initiating Home Page Development
⌨️ (00:04:04) Implementing Data Folder to Store Product Hive Model, Home Local and Remote Source API Providers, and Database Services
⌨️ (00:04:08) Defining Product Model and Converting it to Hive Object
⌨️ (00:06:40) Building Home Remote Data Source (API Provider)
⌨️ (00:08:43) Creating Home DataState Dart File for Structured and Type-Safe Error Handling
⌨️ (00:09:20) Crafting Interface Class for Implementing Repository and Service Classes
⌨️ (00:09:48) Establishing Home Local Data Source (Database Service)
⌨️ (00:12:37) Developing Home Local Data Source (Database Provider)
⌨️ (00:13:30) Designing Connection Helper Class for Connection Checking
⌨️ (00:14:15) THE CRUCIAL SEGMENT OF THE TUTORIAL: Creating a Home Repository to Determine Data Fetching from Local or Remote Sources
⌨️ (00:18:23) Integrating 'get_it' for Dependency Injection and Service Location in our Project
⌨️ (00:21:15) Formulating Bloc: Home Bloc, Home State, Home Status, and Home Event Classes to Incorporate Repository and Transmit Fetched Data to UI
⌨️ (00:21:26) Developing Home Event Class
⌨️ (00:22:30) Developing Home Status Class
⌨️ (00:22:47) Developing Home State Class
⌨️ (00:23:35) Crafting Home Bloc Class
⌨️ (00:26:10) Instantiating Bloc and Registering it in the Service Locator
⌨️ (00:26:35) Providing Previously Created Bloc using BlOCPROIVDER
⌨️ (00:27:01) Organizing Utils Folder: Custom Alerts, Custom Image Viewer, and Custom Loading Widget
⌨️ (00:27:01) Designing User Interface - Home Page - and Integrating Required Bloc Widgets for Checking Different States and Displaying Respective Widgets
⌨️ (00:31:53) Adding Pull-to-Refresh Feature on Home Page
⌨️ (00:32:27) Testing the Developed Features up to This Point
⌨️ (00:33:42) Notifying Users about Data Sources with Top-Side Alerts Using Listener in Bloc Consumer
⌨️ (00:34:55) Creating Error Screen for Instances with No Cached Data
⌨️ (00:36:28) Designing Transparent, Sleek, and Modern Bottom Navigation Bar
⌨️ (00:37:27) PROJECT COMPLETED - FINAL REVIEW AND TESTING
⌨️ (00:39:01) 🚀✨ Don't Miss Out! SUBSCRIBE NOW! 🔔👇 #JoinUs
Рекомендации по теме
Комментарии
Автор

Hello everyone! 😊 Please support us by #subscribing, #commenting, #liking, and #sharing the content! 🙌 Thank you! 🌟

ProgrammingWithFlexZ
Автор

Fantastic video brother, It was super helpful for me, integrating get_it for dependency infection with repository patterns was the new topic that I completely understood and learned from your video, Thanks a lot for taking time to create great videos for your subscribers.🙏🌹

safegame
Автор

Excellent video, a similar video would be good, explaining the process of saving a form offline and then synchronizing that item when connecting to the internet.

bserverne
Автор

I found it very useful for flutter developers and it is recommended to watch it a couple of times to understand it better 🎉

mahdimax
Автор

which extension did you use to convert model to hive??

Amankumar_Raone
Автор

hi i tried your app but it shows no network connection always

abdalwahaborabi
Автор

Too bad this is a music tutorial. Good effort. But not for me!

yasserhy
visit shbcf.ru