Udemy
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
Flutter Hive NoSQL Database
Rating: 4.5 out of 5(23 ratings)
91 students

Flutter Hive NoSQL Database

Build Flutter NoSQL Database App With Hive Package
Created byRichard Dewan
Last updated 9/2022
English
English [Auto],

What you'll learn

  • Flutter
  • Dart
  • Hive
  • Secure Storage

Course content

2 sections19 lectures2h 22m total length
  • Flutter Advance Course2:03

    Flutter Advance Course: https://rdewan.dev/flutter-advance-course

  • Hive Database Introduction5:34

    Explore Hive database in Flutter through memory-resident boxes, a fast key-value store with no schemas, enabling rapid read and write. Learn setup and encryption options.

  • Setup Flutter Project6:19
  • Initialize Hive Database5:25
  • Bottom Navigation9:47
  • Hive Box Basic12:38
  • Hive Type Adaptor8:27
  • Open Student Box11:28
  • Write To Student Box12:48
  • Type Adaptor Teacher Object2:46

    Create a teacher model and generate a Hive type adapter with a unique type ID, then register the adapter in main and prepare the teacher box for use.

  • Teacher Box Read and Write6:26

    Register and open the teacher Hive box and implement add and read operations. Copy the student page to build an add teacher page with id, name, age, and subject fields.

  • Box ValueListenable4:48
  • Type Adaptor Bank Object9:38
  • Hive Box Encryption8:26
  • iOS and Android Box Encryption10:26
  • Closing and Compacting Box7:51

    Close all open hive boxes on exit and compact boxes after deletions, using the default algorithm or a custom deleted-entries strategy.

  • Edit and Delete Record14:54
  • Filter Record3:07

    Filter records by amount greater than 100 using a filter box in Flutter Hive NoSQL database, apply the condition on bank records, and display the filtered results.

Requirements

  • Basic of Flutter & Dart

Description

In this Flutter course we are going to learn about local data storage using Hive package which help us to create NoSQL database, it internally make use of key-value and work well both with Android, iOS, Desktop and Web.

Hive is a lightweight and blazing fast key-value database written in pure Dart. Inspired by Bitcask.

Features

  • Cross platform: mobile, desktop, browser

  • Great performance (see benchmark)

  • Simple, powerful, & intuitive API

  • Strong encryption built in

  • NO native dependencies

  • Batteries included

Store objects

Hive not only supports primitives, lists and maps but also any Dart object you like. You need to generate a type adapter before you can store objects

Hive was written with Flutter in mind. It is a perfect fit if you need a lightweight datastore for your app. After adding the required dependencies and initializing Hive, you can use Hive in your project:


What are boxes?

All data stored in Hive is organized in boxes. A box can be compared to a table in SQL, but it does not have a structure and can contain anything.

For a small app, a single box might be enough. For more advanced problems, boxes are a great way to organize your data. Boxes can also be encrypted to store sensitive data.


When to use Hive

Hive is very performant because it has little overhead compared to relational databases. The API is very close to how the data is stored on the disk.

Key-value databases can be used to store almost any kind of data. For example:

  • User profiles

  • Session information

  • Article/blog comments

  • Messages

  • Shopping cart contents

  • Product categories

  • Binary data

  • etc.

Hive is also one of the best options when it comes to cross-platform support. You don't have to include binaries, and it works in the browser using IndexedDB.

If you use the shared_preferences packages and don't need to access them from native code, you should always use Hive instead.

Who this course is for:

  • Anyone interested in Flutter