You must have encountered keywords like async, await and Future till now. These are very important blocks that one should comprehend.
Get this concept with this video created by Google developers themselves
Async/Await - Flutter in Focus Asynchronous programming
For a better understanding about asynchronous code you can also watch: Asynchronous programming for beginners
There are a lot of options for storing data locally. The most basic one is using the shared_preferences plugin.
Here is a video explaining the shared_preferences plugin
Flutter: Shared Preferences In 5 Minutes | Data Persistence
And a more detailed one: Flutter Tutorial - Shared Preferences
or you can read this tutorial: Using Shared Preferences in Flutter to store data locally
And what’s better than the Flutter documentations themselves :) Store key-value data on disk
Although key-value storage is easy and convenient to use, it has limitations:
- Only primitive types can be used: int, double, bool, string, and stringList.
- It’s not designed to store a lot of data.
sqflite plugin overcomes these limitations.
Before moving any forward, you must know what exactly is SQLite. The following tutorial gives you a brief overview of the same.
What is SQLite? Top SQLite Features You Should Know
Creating a local SQLite database using sqflite package Flutter
Here comes the Flutter part.
There are a bunch of packages available to store data locally on the device, but the one recommended by Flutter is the "sqflite" package which is an SQLite plugin for Flutter.
Here is a short video by Flutter team explaining the sqflite package
sqflite (Flutter Package of the Week)
Now, let's read and learn about the sqflite plugin! Here are the official docs from Flutter team Persist data with SQLite
You can also go through the following links regarding sqflite plugin: SQFlite Database in Flutter
or if you are more of a video person
Flutter Tutorial - SQL Database Storage Using Sqlite & Sqflite CRUD | Android & iOS
sqflite is all you need for storing structured data locally therefore, explore this section only when you are done with sqflite.
Hive is a key-value (NoSQL) based database that is much faster than sqflite.
A beginners tutorial to Hive
Hive (Flutter Tutorial) - Lightweight & Fast NoSQL Database in Pure Dart
Let’s learn the difference between local and push(cloud) notification
Understanding the Advanced Features of the iOS SDK
Local Notification using flutter_local_notification
Now for adding local notification to your app you can use flutter_local_notification package.
You can get an insight on how to use it by reading these blogs:
Implementing local notifications in Flutter
Or if you like watching and learning: