Skip to content

Commit 23a328f

Browse files
authored
Merge pull request #3 from mfazrinizar/dev
v2.0.0
2 parents 3eb22b4 + d1d7201 commit 23a328f

42 files changed

Lines changed: 1517 additions & 131 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci.yml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main, dev]
6+
pull_request:
7+
branches: [main, dev]
8+
9+
# The root package has no cross-repo deps — only pointycastle (hosted).
10+
# example/ depends on flutter_secure_dotenv_generator ^2.0.0 which is
11+
# not yet on pub.dev, so its resolution warns during dart pub get.
12+
# We use "|| true" because the root package always resolves; only the
13+
# example causes exit 1. Once the generator is published, remove "|| true".
14+
15+
jobs:
16+
analyze:
17+
name: Analyze
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: actions/checkout@v4
21+
- uses: dart-lang/setup-dart@v1
22+
with:
23+
sdk: stable
24+
- run: dart pub get || true
25+
- run: dart format --set-exit-if-changed .
26+
- run: dart analyze --fatal-infos lib/ test/
27+
28+
test:
29+
name: Test
30+
runs-on: ${{ matrix.os }}
31+
strategy:
32+
matrix:
33+
os: [ubuntu-latest, windows-latest, macos-latest]
34+
sdk: [stable, "3.8.0"]
35+
steps:
36+
- uses: actions/checkout@v4
37+
- uses: dart-lang/setup-dart@v1
38+
with:
39+
sdk: ${{ matrix.sdk }}
40+
- run: dart pub get || true
41+
- run: dart test
42+
43+
dry-run:
44+
name: Publish Dry Run
45+
runs-on: ubuntu-latest
46+
needs: [analyze, test]
47+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
48+
steps:
49+
- uses: actions/checkout@v4
50+
- uses: dart-lang/setup-dart@v1
51+
with:
52+
sdk: stable
53+
- run: dart pub get || true
54+
- run: dart pub publish --dry-run
55+
56+
pana:
57+
name: Package Analysis
58+
runs-on: ubuntu-latest
59+
steps:
60+
- uses: actions/checkout@v4
61+
- uses: dart-lang/setup-dart@v1
62+
with:
63+
sdk: stable
64+
- run: dart pub global activate pana
65+
- run: dart pub get || true
66+
- run: dart pub global run pana --no-warning .

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,7 @@ pubspec.lock
88

99
.vscode
1010

11-
.env*
11+
.env*
12+
13+
# Encryption key files generated by build_runner — never commit these.
14+
encryption_key.json

CHANGELOG.md

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,23 @@
1-
## 1.0.0
1+
## 2.0.0
22

3-
- Initial version.
4-
- Update dependencies and refactor from discontinued secure_dotenv.
3+
- **BREAKING**: Updated `pointycastle` dependency from `^3.9.1` to `^4.0.0`.
4+
- **BREAKING**: Minimum Dart SDK bumped from `^3.6.0` to `^3.8.0`.
5+
- **Security**: Removed insecure `String.fromEnvironment()` / `--dart-define` pattern from examples (addresses [#2](https://github.com/mfazrinizar/flutter_secure_dotenv/issues/2)).
6+
- Added `SECURITY.md` with detailed encryption key management guidance.
7+
- Updated README with security warnings and recommended key provisioning approaches.
8+
- Updated `lints` to `^6.1.0`, `test` to `^1.29.0`.
9+
- Enhanced test coverage from 8 to 43 tests (padding, random byte generation, edge cases).
10+
- Added fully working Flutter example app with hardcoded key + gitignore approach.
11+
- Added 100% `public_member_api_docs` coverage.
12+
- Made `AESCBCEncrypter` non-instantiable (static-only utility class).
13+
- Added library-level dartdoc comments.
14+
- Added `CONTRIBUTING.md`.
515

616
## 1.0.1
717

8-
- Refactor README and example.
18+
- Refactor README and example.
19+
20+
## 1.0.0
21+
22+
- Initial version.
23+
- Update dependencies and refactor from discontinued secure_dotenv.

CONTRIBUTING.md

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# Contributing to flutter_secure_dotenv
2+
3+
Thank you for your interest in contributing! This guide will help you get started.
4+
5+
## Getting Started
6+
7+
1. Fork the repository
8+
2. Clone your fork:
9+
```bash
10+
git clone https://github.com/<your-username>/flutter_secure_dotenv.git
11+
```
12+
3. Install dependencies:
13+
```bash
14+
dart pub get
15+
```
16+
17+
## Development Workflow
18+
19+
### Branching
20+
21+
- `main` — stable releases published to pub.dev
22+
- `dev` — active development; PRs should target this branch
23+
24+
Create a feature branch from `dev`:
25+
26+
```bash
27+
git checkout -b feature/my-feature dev
28+
```
29+
30+
### Code Quality
31+
32+
Before submitting a PR, make sure all checks pass:
33+
34+
```bash
35+
dart format --set-exit-if-changed .
36+
dart analyze --fatal-infos
37+
dart test
38+
```
39+
40+
CI runs these automatically on every push and pull request.
41+
42+
### Tests
43+
44+
All new features and bug fixes **must** include tests. Run the test suite with:
45+
46+
```bash
47+
dart test
48+
```
49+
50+
## Pull Requests
51+
52+
1. Keep PRs focused — one feature or fix per PR.
53+
2. Write clear commit messages.
54+
3. Update `CHANGELOG.md` under an `## Unreleased` section.
55+
4. Ensure CI passes before requesting review.
56+
57+
## Reporting Issues
58+
59+
- Use [GitHub Issues](https://github.com/mfazrinizar/flutter_secure_dotenv/issues).
60+
- Include Dart SDK version, package version, and a minimal reproduction.
61+
62+
## Security
63+
64+
If you discover a security vulnerability, please see [SECURITY.md](SECURITY.md) for responsible disclosure instructions.
65+
66+
## Code of Conduct
67+
68+
Be respectful and constructive in all interactions. We follow the [Dart community guidelines](https://dart.dev/community).

0 commit comments

Comments
 (0)