encrypted_storage 0.1.0-dev.0+2 copy "encrypted_storage: ^0.1.0-dev.0+2" to clipboard
encrypted_storage: ^0.1.0-dev.0+2 copied to clipboard

Encrypted storage

Encrypted Storage #

style: very good analysis License: MIT app

This package provides a fast and simple way to store and retrieve encrypted data usind sqflite. It uses AES encryption via encrypt to encrypt the data and flutter_secure_storage to store key and initialization vector.

Installation ๐Ÿ’ป #

โ— In order to start using Encrypted Storage you must have the Flutter SDK installed on your machine.

Add encrypted_storage to your pubspec.yaml:

dependencies:
  encrypted_storage:

Install it:

flutter packages get

Getting Started ๐Ÿš€ #

Install melos:

$ dart pub global activate melos

Using melos makes it very easy to work with the project, so enjoy.

Boostrap packages recursively:

$ melos bs

Codegen ๐Ÿฆพ #

This thing will run all code generators for all packages:

$ melos run codegen

Code format checking and analyser ๐Ÿฆ  #

$ melos run check-format
$ melos run analyze

Clean up ๐Ÿงน #

To clean up all packages just run:

$ melos clean

Running Tests ๐Ÿงช #

To run all unit and widget tests use the following command:

$ melos test

Pre-commit preparation ๐Ÿฆ ๐Ÿงช๐Ÿค #

To run code format check, analyzer and all tests use the following command:

$ melos check-all

Package version ๐Ÿ”ข #

Package version is defined in pubspec.yaml file. To bump the version use the following command:

# For development releases:
$ melos version -a --yes --prerelease

# For production releases:
$ melos version -a --yes --graduate

You can use version workflow in GitHub actions to bump the version automatically. This workflow will create a new branch and PR (because push to main is prohibited) with the new version. Don't forget to merge the PR to main! Note: you should use conventional commits to make it work.

Github Secrets ๐Ÿ”‘ #

BOT_ACCESS_TOKEN: Personal access token (PAT) used to fetch the repository. We should use PAT and not default GITHUB_TOKEN because "When you use the repository's GITHUB_TOKEN to perform tasks, events triggered by the GITHUB_TOKEN, with the exception of workflow_dispatch and repository_dispatch, will not create a new workflow run". We want to trigger a workflow from the workflow (to run tests), so we need to use PAT. This thing is used in version workflow.