import 'dart:math'; 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}) async { return handlePage(await api.getSportRecordList(id, page: max(1, pageNum))); } }