encrypted_storage 0.1.0-dev.0+2 encrypted_storage: ^0.1.0-dev.0+2 copied to clipboard
Encrypted storage
Encrypted Storage #
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.