PaginationMeta.fromJson constructor

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

Implementation

factory PaginationMeta.fromJson(Map<String, dynamic> json) {
  return PaginationMeta(
    currentPage: json['current_page'] as int? ?? 1,
    from: json['from'] as int? ?? 0,
    lastPage: json['last_page'] as int? ?? 1,
    path: json['path'] as String? ?? '',
    perPage: json['per_page'] as int? ?? 15,
    to: json['to'] as int? ?? 0,
    total: json['total'] as int? ?? 0,
  );
}