import 'package:get/get.dart';

import '../../../Data/Repository/Orders/Orderrepository.dart';
import '../../../Model/Response/Orders/Getorderresponse.dart';

class OnGoingOrderController extends GetxController{

  RxBool shimmer = true.obs;

  List <OrderDetails> getCurrentOrderList = [];

  OrdersRepository ordersRepository = OrdersRepository();

  getCurrentOrder()async{
    GetOrders? result = await ordersRepository.getCurrentOrders();
    getCurrentOrderList = result?.details??[];
    shimmer.value = false;
    update();
  }

  @override
  void onInit() {
    getCurrentOrder();
    // TODO: implement onInit
    super.onInit();
  }
}