import 'package:json_annotation/json_annotation.dart'; part 'page_list.g.dart'; @JsonSerializable(genericArgumentFactories: true, explicitToJson: true) class PageList { List? records = []; String? total = ''; String? size = ''; String? current = ''; List? orders = []; bool? hitCount = false; bool? searchCount = false; String? pages = ''; PageList({ this.records, this.total, this.size, this.current, this.orders, this.hitCount, this.searchCount, this.pages, }); factory PageList.fromJson(Map json, fromJson) => _$PageListFromJson(json, fromJson); Map toJson(toJson) => _$PageListToJson(this, toJson); } @JsonSerializable(explicitToJson: true) class Orders { String? column = ''; bool? asc = false; Orders(); factory Orders.fromJson(Map json) => _$OrdersFromJson(json); Map toJson() => _$OrdersToJson(this); }