sport_history_model.dart 415 B

123456789101112131415
  1. import 'dart:math';
  2. import 'package:sport/provider/lib/view_state_refresh_list_model.dart';
  3. import 'package:sport/services/api/inject_api.dart';
  4. class SportHistoryModel extends ViewStateRefreshListModel with InjectApi {
  5. final int id;
  6. SportHistoryModel(this.id);
  7. @override
  8. Future<List> loadData({int pageNum}) async {
  9. return handlePage(await api.getSportRecordList(id, page: max(1, pageNum)));
  10. }
  11. }