Flutter Tutorials | #14 - Hive Local NoSQL Storage | Beginner's Course 2023

Опубликовано: 24 Июль 2026
на канале: Стас Ильин
10,901
282

😎 Repository with code from the lessons: https://github.com/Frezyx/flutter_tut...

Links from the video:
⬇️ Hive library https://pub.dev/packages/hive

✅ Useful links:
👨‍💻 My GitHub https://github.com/Frezyx (Lots of Dart / Flutter code)
💬 Telegram with announcements https://t.me/frezycode
🚀 Boosty https://boosty.to/frezycode
📸 Instagram   / frezycode  

Flutter is the perfect tool to get started in IT or transition to it in 2023. And I'm the coach you've been looking for.

In this lesson, we'll get acquainted with Hive local storage in the Flutter infrastructure. Hive is a NoSql database. It's written in pure Dart, without any native code. This magical annihilator gun is incredibly fast and solves most of the problems programmers face when setting up local data storage. It's also ideal for caching.

By the way, caching is exactly what we'll be doing. Anyway, watch the video, because I'm so inspired there that I even cover some programming patterns.

During the course, we'll explore Flutter and how to build your first app. We'll learn how to program in Dart, learn about Flutter's basic widgets, how to work with the HTTP/DIO network, and learn about Flutter's core state management system, BLoC.

00:00 - 01:48 What is Hive DB
01:48 - 03:34 Installing Hive in a Project
03:34 - 04:21 What is a Box in Hive
04:21 - 05:09 What is a TypeAdapter in Hive
05:09 - 05:29 About the Adapter pattern
05:29 - 05:57 A visual explanation of the Adapter pattern
05:57 - 06:58 How to create a TypeAdapter manually
06:58 - 09:16 Generating a TypeAdapter using hive_generator
09:16 - 10:22 How data writing to Hive works under the hood
10:22 - 11:16 Continuing to generate TypeAdapter
11:16 - 12:14 Looking at what hive_generator generated
12:14 - 14:02 What is the typeId for? Binary data entry
14:02 - 14:26 Generating TypeAdapters for other models
14:26 - 15:30 Registering the created adapters in Hive
15:30 - 17:09 Initializing (opening) Hive Box
17:09 - 17:30 What we'll be doing: caching!
17:30 - 18:26 Implementing Hive Box in a Repository
18:26 - 19:09 About Delegation in Repositories
19:09 - 19:48 Keep it Simple, Use KISS
19:48 - 20:12 When to Use Delegation
20:12 - 21:24 Moving the Hive Key to a Constant
21:24 - 22:22 How the Caching Logic Will Work
22:22 - 23:19 Standard Hive Box Methods
23:19 - 24:34 Saving the Entire List of Cryptocurrencies with the PutAll Method
24:34 - 28:29 Implementing Caching Logic Using Hive
28:29 - 29:44 Testing Caching
29:44 - 30:50 Testing Caching After restart
30:50 - 35:07 Caching a single model, the get method, and containsKey
35:07 - 35:42 Checking caching throughout the entire application
35:42 - 38:38 Sorting a list of cryptocurrencies
38:38 - 39:03 Lesson summary and what's next

#loginlogin #programming #flutter