Meta.fromJson constructor

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

Implementation

factory Meta.fromJson(Map<String, dynamic> json) => Meta(
      total: (json['total'] as num?)?.toInt(),
      currentPage: (json['current_page'] as num?)?.toInt(),
      nextPage: (json['next_page'] as num?)?.toInt(),
      perPage: (json['per_page'] as num?)?.toInt(),
      lastPage: (json['last_page'] as num?)?.toInt() ?? 2,
    );