getList abstract method

List<String> getList(
  1. String key, {
  2. String separator = ',',
  3. List<String> defaultValue = const [],
})

Returns a list of strings split by separator.

The default separator is a comma (,).

Example:

ALLOWED_ORIGINS=http://localhost:3000,https://myapp.com
final origins = env.getList('ALLOWED_ORIGINS');

Implementation

List<String> getList(
  String key, {
  String separator = ',',
  List<String> defaultValue = const [],
});