PagingResponse<T>.fromMapJson constructor

PagingResponse<T>.fromMapJson(
  1. Map<String, dynamic> json
)

Implementation

factory PagingResponse.fromMapJson(Map<String, dynamic> json) {
  return PagingResponse(
    total: json['total'] == null ? 0 : json['total'] as int,
    data: json['records'] == null ? [] : json['records'] as List<T>,
  );
}