From 9ab0d6688827fe1c7a67e78b8b4263e94acd7639 Mon Sep 17 00:00:00 2001 From: Amjad amireh Date: Mon, 5 Oct 2020 09:17:38 +0300 Subject: [PATCH] child Vaccines --- .../childvaccines/child_vaccines_service.dart | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 lib/core/service/childvaccines/child_vaccines_service.dart diff --git a/lib/core/service/childvaccines/child_vaccines_service.dart b/lib/core/service/childvaccines/child_vaccines_service.dart new file mode 100644 index 00000000..dc317a3e --- /dev/null +++ b/lib/core/service/childvaccines/child_vaccines_service.dart @@ -0,0 +1,29 @@ + +import 'package:diplomaticquarterapp/core/model/childvaccines/List_BabyInformationModel.dart'; +import 'package:diplomaticquarterapp/config/config.dart'; +import '../base_service.dart'; + +class ChildVaccinesService extends BaseService{ + +List BabyInformationModelList = 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); +} + +} \ No newline at end of file