import 'package:betting/data/base_service/api_response.dart';
import 'package:betting/data/model/res/matches/matches.dart';
import 'package:betting/data/model/res/stats/stats.dart';
import 'package:betting/data/repository/matches/matches_repo.dart';
import 'package:get/get.dart';

class StatsMatchesRegionsController extends GetxController{
  var ischaange = 0.obs;
  MatchesRepo matchesRepo = MatchesRepo();
  var itemStats = <Stats>[].obs;
  var itemMatches = Matches().obs;
  @override
  void onInit() {
    itemMatches.value = Get.arguments;
    getStatsMatches(itemMatches.value.sId!);
    super.onInit();
  }


  void getStatsMatches(String matchesId) async {
    await matchesRepo.getStatsMatches(matchesId).then((value) {
      if(value.state == Status.SUCCESS){
        itemStats.value = value.object!;
      }
    },);
  }


}