Wgt.fromJson constructor

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

Implementation

Wgt.fromJson(Map<String, dynamic> json) :
    this.model = SamIotWidgets.instance.collection
        .singleWhereOrNull((w) => w.id == json['model'].toString()),
    this.name = ifNullReturnEmpty(json['name']),
    this.defaultTitle = ifNullReturnEmpty(json['default_title']),
    this.defaultLogo = ifNullReturnEmpty(json['default_logo']),
    this.defaultWidth = json['default_width'],
    this.defaultHeight = json['default_height'],
    this.elements = getElements(json);