fromJson static method

ServicePagination? fromJson(
  1. Map<String, dynamic>? json
)
override

Returns a new ServicePagination instance and imports its values from json if it's non-null, null if json is null.

Implementation

static ServicePagination? fromJson(Map<String, dynamic>? json) {
  if (json == null) {
    return null;
  }

  return ServicePagination(
    limit: json[r'limit'],
    page: json[r'page'],
    pages: json[r'pages'],
    total: json[r'total'],
    links: PaginationLinks.fromJson(json[r'_links']),
    embedded: ServiceCollection.fromJson(json[r'_embedded']),
  );
}