Env<T> constructor

const Env<T>(
  1. String _key, {
  2. T? defaultValue,
})

Creates a new Env accessor for a given environment variable.

Example

final apiUrl = Env<String>('API_URL');
final timeout = Env<int>('TIMEOUT', defaultValue: 30);

Implementation

const Env(this._key, {this.defaultValue});