Hive is a lightweight and fast key-value database solution that is cross-platform (runs on mobile, desktop, and web) and is written in pure Dart. Let’s first take a look at why you should choose Hive over the other solutions available for persisting data locally in Flutter. We will also look into a concept that allows you to handle simple relational data in Hive. In this article, you will learn how to get started with Hive before we build a simple app using Flutter. shared_preferences is a good package for storing small key-value pairs locally, and sqflite, the SQLite package for Flutter, is a good choice when you’re dealing with strong relational data that requires you to handle complex relationships in the database.īut if you want a fast and secure local database with no native dependencies that also runs on Flutter web (□), then Hive is a pretty good choice. Almost every app requires that you handle data - from storing customer information for a food delivery app, to the number of points scored in a game or a simple value to understand whether the user has turned on dark mode during their last visit.įlutter provides many local data persistence options for developers to choose from. Storing data locally and persisting between app launches is one of the fundamental concepts of any mobile app development process. ![]() ![]() Handling local data persistence in Flutter with Hive Souvik Biswas Follow Mobile developer (Android, iOS, and Flutter), technical writer, IoT enthusiast, avid video game player.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |