Collections.fromGraphJson constructor

Collections.fromGraphJson(
  1. Map<String, dynamic> json
)

The Collections from graph json

Implementation

factory Collections.fromGraphJson(Map<String, dynamic> json) => Collections(
  collectionList: _getCollectionList(json),
  // Default to false like Products/Orders do: a payload without pageInfo
  // (e.g. the synthesized edge list in getCollectionsByIds, or a connection
  // queried without pageInfo) otherwise threw a TypeError on a null bool.
  hasNextPage: (json['pageInfo'] ?? const {})['hasNextPage'] ?? false,
);