class Page { String totalCount; int pageSize; int totalPage; int firstPage; int prevPage; int nextPage; int lastPage; int currentPage; List allPages; int offset; int limit; Page( {this.totalCount, this.pageSize, this.totalPage, this.firstPage, this.prevPage, this.nextPage, this.lastPage, this.currentPage, this.allPages, this.offset, this.limit}); Page.fromJson(Map json) { totalCount = json['total_count']; pageSize = json['page_size']; totalPage = json['total_page']; firstPage = json['first_page']; prevPage = json['prev_page']; nextPage = json['next_page']; lastPage = json['last_page']; currentPage = json['current_page']; allPages = json['all_pages'].cast(); offset = json['offset']; limit = json['limit']; } Map toJson() { final Map data = new Map(); data['total_count'] = this.totalCount; data['page_size'] = this.pageSize; data['total_page'] = this.totalPage; data['first_page'] = this.firstPage; data['prev_page'] = this.prevPage; data['next_page'] = this.nextPage; data['last_page'] = this.lastPage; data['current_page'] = this.currentPage; data['all_pages'] = this.allPages; data['offset'] = this.offset; data['limit'] = this.limit; return data; } }