DeviceGroup.fromJson constructor
Implementation
factory DeviceGroup.fromJson(Map<String, dynamic> json) {
return DeviceGroup(
id: json['group_id'],
name: json['group_name'],
nodes: json['nodes'].cast<String>(),
subgroups: (json['sub_groups'] as List?)
?.map<DeviceGroup>((e) => DeviceGroup.fromJson(e))
.toList(),
type: json['type'],
);
}