penv 1.0.0 copy "penv: ^1.0.0" to clipboard
penv: ^1.0.0 copied to clipboard

A tiny, dependency-light loader for .env-style environment files.

example/penv_example.dart

// Run this example from the package root:
//   dart run example/penv_example.dart
//
// On first run there's no `.env` file yet, so penvload will create a
// placeholder at .env and throw EnvFileNotFoundException. Fill in the
// generated file and run again to see it load successfully.

import 'package:penv/penv.dart';

void main() {
  try {
    final env = penvload('.env');

    print('Loaded ${env.length} variable(s):');
    env.forEach((key, value) => print('  $key=$value'));
  } on EnvFileNotFoundException catch (e) {
    print(e);
  }
}
0
likes
160
points
150
downloads

Documentation

API reference

Publisher

verified publisherpsdkjoon.ir

Weekly Downloads

A tiny, dependency-light loader for .env-style environment files.

Repository (GitHub)
View/report issues

License

MIT (license)

More

Packages that depend on penv