listFromJson static method

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

Implementation

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

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

    return previousValue;
  });
}