Files
zh-chat-flutter/lib/models/page_model.dart
2022-10-20 14:33:16 +08:00

24 lines
535 B
Dart

class PageModel {
PageModel({
required this.current,
required this.totalPage,
required this.perPage,
required this.hasMore,
required this.total,
});
final int current;
final int totalPage;
final int perPage;
final bool hasMore;
final int total;
factory PageModel.fromJson(Map<String, dynamic> json) => PageModel(
current: json['current'],
totalPage: json['total_page'],
perPage: json['per_page'],
hasMore: json['has_more'],
total: json['total'],
);
}