listFromJson static method

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

Implementation

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

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

    return previousValue;
  });
}