DotEnvFileSource constructor

DotEnvFileSource(
  1. String path, {
  2. bool optional = false,
  3. String prefix = '',
  4. String separator = '__',
})

Resolves path at construction; optional permits only missing files.

Implementation

DotEnvFileSource(
  String path, {
  this.optional = false,
  this.prefix = '',
  this.separator = '__',
}) : path = File(path).absolute.path {
  if (separator.isEmpty) throw ArgumentError('Separator must not be empty.');
}