Config.fromJson constructor

Config.fromJson(
  1. Map<String, String> json
)

Implementation

factory Config.fromJson(Map<String, String> json) {
  Config config = Config(
    credentials: json['keys'] as Map ?? {},
    keys: json['keys'] as Map ?? {},
  );
  userId = json['userId'] ?? "";
  if (json["credentials"] != null) {
    config.credentials = json["credentials"];
  }
  if (json["keys"] != null) {
    config.keys = json["keys"] as Map;
  }
  return config;
}