import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/core/model/childvaccines/get_vacainations_itemsmodel.dart';

import '../base_service.dart';

class GetVccinationsItemsService extends BaseService {
  List<GET_VACCINATIONS_ITEMSMODEL> getVaccinationsItemModelList = List();
  Map<String, dynamic> body = Map();



  Future getaccinationsitemOrders() async {
    hasError = false;
    await baseAppClient.post(GET_TABLE_REQUEST,
        onSuccess: (dynamic response, int statusCode) {
          getVaccinationsItemModelList.clear();
          response['List_CreateVaccinationTableModel'].forEach((vital) {
            getVaccinationsItemModelList.add(
                GET_VACCINATIONS_ITEMSMODEL.fromJson(vital));
          });
        }, onFailure: (String error, int statusCode) {
          hasError = true;
          super.error = error;
        }, body: body);
  }

}