ListTrailsResponse.fromJson constructor

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

Implementation

factory ListTrailsResponse.fromJson(Map<String, dynamic> json) {
  return ListTrailsResponse(
    nextToken: json['NextToken'] as String?,
    trails: (json['Trails'] as List?)
        ?.whereNotNull()
        .map((e) => TrailInfo.fromJson(e as Map<String, dynamic>))
        .toList(),
  );
}