TrailListResult.fromJson constructor

TrailListResult.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory TrailListResult.fromJson(Map<String, dynamic> json) {
  return TrailListResult(
    entries:
        (json['entries'] as List?)
            ?.map((e) => TrailEntry.fromJson(e as Map<String, dynamic>))
            .toList() ??
        [],
    totalCount: json['totalCount'] as int? ?? 0,
    questId: json['questId'] as String?,
    host: json['host'] as String?,
  );
}