RoutesResponse.fromJson constructor

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

Implementation

RoutesResponse.fromJson(Map<String, dynamic> json) {
  routes = List<RouteApiDto>.from(
      json['routes'].map((val) => RouteApiDto.fromJson(val)).toList());
  pagination = json['pagination'] != null
      ? PaginationApiDto.fromJson(json['pagination'])
      : null;
}