Drizzle ๐Ÿ’ง

style: very good analysis Powered by Mason License: MIT

A simple package to persist and query small dataset of data.

Still heavily in development so Documentation will be written later. So for now check the example on how to use the API. Better documentation may be written later.

Motivation

During the some of the development of my games, I find myself in need of persisting and manipulating small dataset of data.

Flutter/Dart have great database packages, but they always felt too much for what I needed, while when just using shared_preferences, I found myself doing the same manual manipulation over and over again. So I felt that I could build some in between.

Drizzle is based on the three pillars:

  • It is meant for small sets of data.
  • It keeps all the data in memory, and persist them in the background
  • It allow for persistence to be configured

As one can note, Drizzle was born to solve a very specific user case, so if you found it while searching for a more complete and general use data persistence package for flutter/dart, I really recommend trying one of the followings:

Installation ๐Ÿ’ป

โ— In order to start using Drizzle you must have the Dart SDK installed on your machine.

Add drizzle to your pubspec.yaml:

dependencies:
  drizzle:

Install it:

dart pub get

Continuous Integration ๐Ÿค–

Drizzle comes with a built-in GitHub Actions workflow powered by Very Good Workflows but you can also add your preferred CI/CD solution.

Out of the box, on each pull request and push, the CI formats, lints, and tests the code. This ensures the code remains consistent and behaves correctly as you add functionality or make changes. The project uses Very Good Analysis for a strict set of analysis options used by our team. Code coverage is enforced using the Very Good Workflows.


Running Tests ๐Ÿงช

To run all unit tests:

dart pub global activate coverage 1.2.0
dart test --coverage=coverage
dart pub global run coverage:format_coverage --lcov --in=coverage --out=coverage/lcov.info

To view the generated coverage report you can use lcov.

# Generate Coverage Report
genhtml coverage/lcov.info -o coverage/

# Open Coverage Report
open coverage/index.html

Libraries

drizzle
A simple package to persist and query small dataset of data