diff --git a/lib/core/service/childvaccines/child_vaccines_service.dart b/lib/core/service/childvaccines/child_vaccines_service.dart index dc317a3e..d614f9a5 100644 --- a/lib/core/service/childvaccines/child_vaccines_service.dart +++ b/lib/core/service/childvaccines/child_vaccines_service.dart @@ -1,29 +1,30 @@ - import 'package:diplomaticquarterapp/core/model/childvaccines/List_BabyInformationModel.dart'; import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/core/model/childvaccines/user_information_model.dart'; import '../base_service.dart'; -class ChildVaccinesService extends BaseService{ - -List BabyInformationModelList = List(); +class ChildVaccinesService extends BaseService { + List babyInformationModelList = List(); + List userInformationModelList = List(); Map body = Map(); -Future getAllBabyInformationOrders() async { - hasError = false; - body['List_BabyInformationModel'] = false; - - - await baseAppClient.post(GET_BABYINFORMATION_REQUEST, - onSuccess: (dynamic response, int statusCode) { - BabyInformationModelList.clear(); - - response['List_BabyInformationModel'].forEach((vital) { - - BabyInformationModelList.add(List_BabyInformationModel.fromJson(vital)); - }); - }, onFailure: (String error, int statusCode) { - hasError = true; - super.error = error; - }, body: body); + Future getAllBabyInformationOrders() async { + hasError = false; + body['isDentalAllowedBackend'] = false; + body['IsLogin'] = true; + //body['UserID'] = babyInformationModelList[0].userID; + body['UserID'] = 42843; + + + await baseAppClient.post(GET_BABYINFORMATION_REQUEST, + onSuccess: (dynamic response, int statusCode) { + babyInformationModelList.clear(); + + response['List_BabyInformationModel'].forEach((vital) { + babyInformationModelList.add(List_BabyInformationModel.fromJson(vital)); + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + } } - -} \ No newline at end of file