import 'dart:convert';

import 'package:siro_driver/constant/box_name.dart';
import 'package:siro_driver/constant/links.dart';
import 'package:siro_driver/controller/functions/crud.dart';
import 'package:siro_driver/main.dart';
import 'package:get/get.dart';

class MaintainCenterController extends GetxController {
  bool isLoading = false;
  Map tripCount = {};

  Future getTripCountByCaptain() async {
    var res = await CRUD().get(link: AppLink.getTripCountByCaptain, payload: {
      "driver_id": box.read(BoxName.driverID).toString(),
    });
    if (res != 'failure') {
      tripCount = jsonDecode(res)['message'];
      update();
    }
  }
}
