AdditionalInfo.fromMap constructor

AdditionalInfo.fromMap(
  1. Map<String, dynamic> json
)

Implementation

factory AdditionalInfo.fromMap(Map<String, dynamic> json) {
  return AdditionalInfo(
    param: json["Param"] == null
        ? []
        : json["Param"]
                is List // Param cam an MAP or List<Map> depends on device response
            ? List<Param>.from([...(json["Param"])].map((x) => Param.fromMap(x)))
            : List<Param>.from([json["Param"]].map((x) => Param.fromMap(x))),
  );
}