IotWidgetElement.fromJson constructor
IotWidgetElement.fromJson(
- Map<String, dynamic> json
)
Implementation
IotWidgetElement.fromJson(Map<String, dynamic> json)
: this.id = json['id'].toString(),
this.title = ifNullReturnEmpty(json['title']),
this.icon = ifNullReturnEmpty(json['icon']),
this.settable = json.containsKey('settable') ? json['settable'] == true : null,
this.retained = json.containsKey('retained') ? json['retained'] == true : null,
this.numOfParameters = json['num_of_parameters'],
this.acceptedParameters = (json['accepted_parameters'] as List)
.map((a) => AcceptedParameter.fromJson(a))
.toList();