
import 'package:absenkuv3/Repository/Model/mBadge.dart';
import 'package:absenkuv3/Setting/Header.dart';
import 'package:dio/dio.dart';
import 'serviceInfo.dart';

class BadgeApi {
  Dio dio = ServerInfo().getConnection();
  Future<JumlahBadge> badgeShift() async {
    var respon = await dio.get("badge/shift",
        queryParameters: {},
        options: Options(headers: await Header().getHeader()));
    // print(respon);
    // print('======');
    if (respon.statusCode == 200) {
      return jumlahBadgeFromJson(respon.data);
    } else {
      return JumlahBadge(success: false);
    }
  }
}
