12345678910111213141516 |
- import 'dart:math';
- import 'package:sport/bean/sport_detail.dart';
- import 'package:sport/provider/lib/view_state_refresh_list_model.dart';
- import 'package:sport/services/api/inject_api.dart';
- class SportHistoryModel extends ViewStateRefreshListModel<RecordsTodaySum> with InjectApi {
- final int id;
- SportHistoryModel(this.id);
- @override
- Future<List<RecordsTodaySum>> loadData({int pageNum=0}) async {
- return handlePage(await api.getSportRecordList(id, page: max(1, pageNum)));
- }
- }
|