Wgt.fromJson constructor
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);