1234567891011121314151617181920212223 |
- import 'dart:math';
- 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 MessageDetailModel extends ViewStateRefreshListModel with InjectApi {
- final String type;
- String _read = "all";
- MessageDetailModel(this.type);
- readAll() {
- _read = "all";
- initData();
- }
- @override
- Future<List> loadData({int pageNum = 1}) async {
- return handlePage(await api.getNoticeList(
- type: type, page: max(1, pageNum), read: "$_read"));
- }
- }
|