listFromJson static method

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

Implementation

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

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

    return previousValue;
  });
}