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 with InjectApi { final int id; SportHistoryModel(this.id); @override Future> loadData({int pageNum=0}) async { return handlePage(await api.getSportRecordList(id, page: max(1, pageNum))); } }