IotWidget.fromJson constructor

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

Implementation

IotWidget.fromJson(Map<String, dynamic> json)
    : this.id = json['id'].toString(),
      this.title = ifNullReturnEmpty(json['title']),
      this.icon = ifNullReturnEmpty(json['icon']),
      this.minWidth = json['min_width'],
      this.minHeight = json['min_height'],
      this.tags = ifNullReturnEmpty(json['tags']),
      this.compatibleModels = getCompatibleModels(json),
      this.vendor = ifNullReturnEmpty(json['vendor']),
      this.elements = (json['elements'] as List)
          .map((e) => IotWidgetElement.fromJson(e))
          .toList();