class PageInfo { PageInfo(); int pageNum; dynamic current; int pageSize; dynamic size; dynamic pages; bool hasPreviousPage; bool hasNextPage; String total; List list; List records; factory PageInfo.fromJson(Map json) => PageInfo() ..pageNum = json['pageNum'] as int ..current = json['current'] ..pageSize = json['pageSize'] as int ..size = json['size'] ..pages = json['pages'] ..hasPreviousPage = json['hasPreviousPage'] as bool ..hasNextPage = json['hasNextPage'] as bool ..total = json['total'] as String ..list = json['list'] as List ..records = json['records'] as List; Map toJson() => { 'pageNum': this.pageNum, 'current': this.current, 'pageSize': this.pageSize, 'size': this.size, 'pages': this.pages, 'hasPreviousPage': this.hasPreviousPage, 'hasNextPage': this.hasNextPage, 'total': this.total, 'list': this.list, 'records': this.records, }; }