fromJson method

void fromJson(
  1. String json
)

Takes a json string created by toJson clears the current set of environment variables and replaces them with the environment variables encoded in the json string.

If you choose not to use toJson to create the json then json must be in form of an json encoded Map<String,String>.

Implementation

void fromJson(String json) {
  _envVars.clear();
  env.addAll(
    Map<String, String>.from(
      const JsonDecoder().convert(json) as Map<dynamic, dynamic>,
    ),
  );
}