ElementResources.fromJson constructor

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

Implementation

ElementResources.fromJson(Map<String, dynamic> json)
    : this.elementId = json.containsKey('element_id') && json['element_id'] != null
          ? ifNullReturnEmpty(json['element_id'])
          : "",
      this.resourcesId = (json['resources_id'] as List).length > 0
          ? (json['resources_id'] as List).map((e) => e.toString()).toList()
          : [],
      this.resources = [];