Config.template constructor

Config.template(
  1. String name
)

Implementation

Config.template(String name) {
  Map<String, dynamic> json = {
    "default": {
      "vars": {"APP_NAME": name, "VERSION": "1.0.0"},
      "files": {}
    },
    "environments": {
      "development": {
        "vars": {"APP_NAME": '$name DEVELOPMENT'},
        "files": {}
      },
      "staging": {
        "vars": {"APP_NAME": '$name STAGING'}
      },
      "production": {}
    }
  };
  defaults = ConfigEnvironment.fromJson(json['default']);
  environments = Map.from(json['environments']).map((key, value) => MapEntry(key, ConfigEnvironment.fromJson(value)));
}