Home
🌿 Open Source Package

Stop Rebuilding.
Start Switching.

pub.dev Verified Publisher
v3.0.0MIT Licensed160 Pub Points
envified

The runtime brain for your Flutter app. Swap environments in 0.2 seconds. No rebuild. No hot reload. Just tap, tap, done.

πŸš€
Install Command
flutter pub add envified
main.dart
dart
1void main() async {
2 WidgetsFlutterBinding.ensureInitialized();
3 
4 // 🌿 One-line setup β€” auto-discovers .env.* files
5 await EnvConfigService.instance.init(
6 defaultEnv: Env.dev,
7 allowProdSwitch: false, // πŸ”’ lock prod by default
8 verifyIntegrity: true, // πŸ” SHA-256 tamper check
9 onAfterSwitch: (config) => {
10 debugPrint('Switched to: ${config.baseUrl}');
11 },
12 );
13 
14 runApp(const MyApp());
15}
⚑

0.2s Env Switch

Swap dev↔prod without rebuilding. Ever.

await svc.switchTo(Env.prod);
πŸ”’

Production Lock

allowProdSwitch: false prevents accidental data disasters.

allowProdSwitch: false
πŸ”

SHA-256 Tamper Detection

Hash every .env file on first launch. Throw on mismatch.

verifyIntegrity: true
πŸ›‘οΈ

PIN / Biometric Gate

Face ID or 4-digit PIN before the debug panel opens.

EnvGate(pin: '1234', biometric: true)
πŸ“‹

Encrypted Audit Log

Every switch logged. Capped at 50. Visible in panel.

await svc.auditLog
πŸ‘»

Zero Prod Overhead

Entire debug UI tree-shaken in release builds.

enabled: kDebugMode
🎯

Typed Getters

getBool, getInt, getDouble, getUri, getList β€” typed.

svc.getInt('TIMEOUT', fallback: 30)
🌿

Auto-Discovery

Drop .env.dev, .env.prod β€” envified finds them all.

autoDiscover: true
πŸ””

Smart Restart Detection

Warns when deps need re-init after switch.

svc.restartNeeded.value
app.dart β€” overlay setup
dart
1// Wrap your app β€” overlay auto-hides in release
2MaterialApp(
3 builder: (context, child) => EnvifiedOverlay(
4 service: EnvConfigService.instance,
5 enabled: kDebugMode,
6 gate: EnvGate(pin: '1234', biometric: true),
7 trigger: const EnvTrigger.tap(count: 7),
8 child: child!,
9 ),
10)
1
Installflutter pub add envified
2
SetupAdd .env files to assets
3
Initialiseawait init() before runApp
Built in Public

The code is out there.
Judge away.

MIT-licensed. Everything is in the open. The Flutter community gave me a lot and this is how I give back.

Sam21-39/envified
v3.0.0

🌿 Runtime environment switching for Flutter applications with security in mind.

160 Pub Points
Verified Publisher
MIT
License
Language breakdownDart 75%
pubspec.yaml
yaml
1dependencies:
2 flutter:
3 sdk: flutter
4 envified: ^3.0.0
5 
6flutter:
7 assets:
8 - .env.dev
9 - .env.prod