123456789101112131415161718 |
- import 'dart:math';
- import 'package:sport/bean/comment.dart';
- import 'package:sport/bean/post.dart';
- import 'package:sport/provider/lib/view_state_refresh_list_model.dart';
- import 'package:sport/services/api/inject_api.dart';
- class CommentSubListModel extends ViewStateRefreshListModel with InjectApi {
- final Comment _comment;
- CommentSubListModel(this._comment);
- @override
- Future<List> loadData({int pageNum = 1}) async {
- // return (await api.getPostCommentSubs(_comment.id, page: 1)).pageResult.results.where((element) => !list.any((e) => e.id == element.id)).toList();
- return handlePage(await api.getPostCommentSubs(_comment.id, page: pageNum));
- }
- }
|