import 'package:flutter/cupertino.dart';
import 'package:get/get.dart';

class DashboardController extends GetxController with GetSingleTickerProviderStateMixin {
  late AnimationController animationController;
  var tabIndex = 0.obs;

  void changeTabIndex(int index) {
    debugPrint('changeTabIndex $index');
    tabIndex.value = index;
  }

  @override
  void onInit() {
    animationController = AnimationController(vsync: this, duration: Duration(milliseconds: 300), value: 1);
    super.onInit();
  }

  @override
  void dispose() {
    animationController.dispose();
    super.dispose();
  }

  //  Hide bottom navbar on scroll down
  /* bool handleScrollNotification(ScrollNotification notification) {
    if (notification.depth == 0) {
      if (notification is UserScrollNotification) {
        final UserScrollNotification userScroll = notification;
        switch (userScroll.direction) {
          case ScrollDirection.forward:
            animationController.forward();
            break;
          case ScrollDirection.reverse:
            animationController.reverse();
            break;
          case ScrollDirection.idle:
            break;
        }
      }
    }
    return false;
  } */
}
