Dart SDK - Environment variables#

Environment-scoped variables for your project's runtime.

Set and list#

await db.env.set('STRIPE_KEY', 'sk_test_123');                    // default: production
await db.env.set('DEBUG', 'true', environment: 'development');    // production | preview | development

await db.env.list();
DART

Update and remove#

await db.env.update(varId, value: 'sk_live_456');
await db.env.update(varId, environment: 'preview');
await db.env.remove(varId);
DART

Bulk set#

await db.env.bulkSet('development', {'DEBUG': 'true', 'LOG_LEVEL': 'debug'});
DART

Next: Secrets.