Option.fromJson constructor

Option.fromJson(
  1. Map<String, dynamic> json,
  2. String? model
)

Implementation

Option.fromJson(Map<String, dynamic> json, String? model)
    : this.parentIds = json.containsKey("parent") && json['parent'] != null
    ? List.from(json["parent"])
    : model != null ? [model] : [],
      this.id = json['id'].toString(),
      this.name = ifNullReturnEmpty(json['name']),
      this.duplicable = json.containsKey("duplicable") ? json['duplicable'] : false,
      this.event = ChartEvent.fromJson(json['event']),
      this.action = ChartAction.fromJson(json['action']);