
import 'package:betting/view/mobile/favourites_view/matches_view/list_fixtures/fixtures_screen.dart';
import 'package:betting/view/mobile/favourites_view/matches_view/list_results/result_screen.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:intl/intl.dart';

class MatchesController extends GetxController {
  List<String> options = ['FIXTURES', 'RESULTS'];
  var outputTimeFormat = DateFormat('HH:mm');
  List<Widget> pageViews = [
    FixturesScreen(),
    ResultScreen(),
  ];

  var indexClick = 0.obs;
  PageController pageController = PageController(
    initialPage: 0,
    keepPage: true,
  );

  onPageViewChange(int page) {
    indexClick.value = page;
    if (page != 0) {
      indexClick.value - 1;
    } else {
      indexClick.value = 0;
    }
  }
}
