CollectionResult.fromJson constructor

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

Implementation

factory CollectionResult.fromJson(Map<String, dynamic> json) {
  /// Return [CollectionResult]
  return CollectionResult(
      page: json['page'],
      perPage: json['per_page'],
      collections: _collectionList(json['collections'] as List<dynamic>?),
      totalResults: json['total_results'],
      nextPage: json['next_page'],
      prevPage: json['prev_page']);
}