PageRequest.fromJson constructor

PageRequest.fromJson(
  1. Map<String, Object?> json
)

Implementation

factory PageRequest.fromJson(Map<String, Object?> json) => PageRequest(
      purpose: json["purpose"] == null ? null : json["purpose"] as String,
      status: json["status"] == null ? null : Status.fromJson(json["status"]),
      pageNumber: json["page_number"] == null
          ? null
          : (json["page_number"] as num).toInt(),
      pageSize: json["page_size"] == null
          ? null
          : (json["page_size"] as num).toInt(),
      createdAfter: json["created_after"] == null
          ? null
          : decodeDateTime(json["created_after"]),
      createdBefore: json["created_before"] == null
          ? null
          : decodeDateTime(json["created_before"]),
    );