TenantProfileConfiguration.fromJson constructor

TenantProfileConfiguration.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory TenantProfileConfiguration.fromJson(Map<String, dynamic> json) {
  if (json.containsKey('type')) {
    var deviceProfileType = tenantProfileTypeFromString(json['type']);
    switch (deviceProfileType) {
      case TenantProfileType.DEFAULT:
        return DefaultTenantProfileConfiguration.fromJson(json);
    }
  } else {
    throw FormatException('Missing type!');
  }
}