import 'package:json_annotation/json_annotation.dart'; part 'page.g.dart'; @JsonSerializable(genericArgumentFactories: true) 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, D Function(dynamic d) fromJsonD) => _$PageInfoFromJson(json, fromJsonD); Map toJson(Object Function(D value) toJsonD) => _$PageInfoToJson(this, toJsonD); }