
import 'package:hmg_patient_app/config/config.dart';
import 'package:hmg_patient_app/core/model/blooddonation/blood_groub_details.dart';

import '../base_service.dart';

class BloodDetailsService extends BaseService{

  // List<CitiesModel> CitiesModelList =[];
  // Map<String, dynamic> body = Map();

  List<List_BloodGroupDetailsModel> BloodModelList =[];
  Map<String, dynamic> body = Map();
  Future getAllBloodOrders() async {
    hasError = false;
    body['List_BloodGroupDetails'] = false;
    await baseAppClient.post(GET_BLOOD_REQUEST,
        onSuccess: (dynamic response, int statusCode) {
          BloodModelList.clear();

          response['List_BloodGroupDetails'].forEach((vital) {
            BloodModelList.add(List_BloodGroupDetailsModel.fromJson(vital));
          });
        }, onFailure: (String error, int statusCode) {
          // hasError = true;
          super.error = error;
        }, body: body);
  }


}