wuchuheng_env

Creator: coderz1093

Last updated:

0 purchases

wuchuheng_env Image
wuchuheng_env Images

Languages

Categories

Add to Cart

Description:

wuchuheng env

This is a dot env loading library
Features #
Getting started #
Depend on it
Run this command:
With Dart:
$ dart pub add wuchuheng_env
copied to clipboard
This will add a line like this to your package's pubspec.yaml (and run an implicit dart pub get):
dependencies:
wuchuheng_env: ^1.0.2
copied to clipboard
Alternatively, your editor might support dart pub get. Check the docs for your editor to learn more.
Import it
Now in your Dart code, you can use:
import 'package:wuchuheng_env/wuchuheng_env.dart';
copied to clipboard
Usage #
to /example folder.
import 'dart:io';

import 'package:test/test.dart';
import 'package:wuchuheng_env/wuchuheng_env.dart';

void main() {
group('A group of tests', () {
setUp(() {
// Additional setup goes here.
});

test('Env Test', () {
final file = '${Directory.current.path}/test/.env';
DotEnv(file: file);
expect(DotEnv.get('FOO', ''), 'foo');
expect(DotEnv.get('SIGN_QUOTATION', ''), 'SIGN_QUOTATION');
expect(DotEnv.get('DOUBLE_QUOTE', ''), 'DOUBLE_QUOTE');
expect(
DotEnv.get('TRIM_SPACE_FROM_UNQUOTE', ''),
'TRIM_SPACE_FROM_UNQUOTE',
);
expect(DotEnv.get('BOOL', false), true);
});
});
}
copied to clipboard
Additional information #
contribute to the package, how to file issues, what response they can expect
from the package authors, and more.

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.