listFromJson static method

List<DeviceLinksPersonIriTemplate> listFromJson(
  1. List? json
)

Implementation

static List<DeviceLinksPersonIriTemplate> listFromJson(List<dynamic>? json) {
  if (json == null) {
    return <DeviceLinksPersonIriTemplate>[];
  }

  return json.fold(<DeviceLinksPersonIriTemplate>[],
      (List<DeviceLinksPersonIriTemplate> previousValue, element) {
    final DeviceLinksPersonIriTemplate? object =
        DeviceLinksPersonIriTemplate.fromJson(element);
    if (object is DeviceLinksPersonIriTemplate) {
      previousValue.add(object);
    }

    return previousValue;
  });
}