models updates -> 3.13.6

merge-update-with-lab-changes
devamirsaleemahmad 2 years ago
parent 04244675e1
commit cb56750e6b

@ -1,7 +1,7 @@
class ImagesInfo { class ImagesInfo {
final String imageAr; final String? imageAr;
final String imageEn; final String? imageEn;
final bool isAsset; final bool? isAsset;
ImagesInfo({this.imageAr, this.imageEn, this.isAsset = false}); ImagesInfo({this.imageAr, this.imageEn, this.isAsset = false});
} }

@ -1,7 +1,7 @@
class ResponseModel<T>{ class ResponseModel<T>{
final bool status; final bool? status;
final String error; final String? error;
final T data; final T? data;
ResponseModel({this.status, this.data, this.error}); ResponseModel({this.status, this.data, this.error});
} }

@ -1,7 +1,7 @@
class BrandsModel { class BrandsModel {
String id; String? id;
String name; String? name;
String namen; String? namen;
Null image; Null image;
BrandsModel({this.id, this.name, this.namen, this.image}); BrandsModel({this.id, this.name, this.namen, this.image});

@ -1,13 +1,13 @@
class CategoriseParentModel { class CategoriseParentModel {
String id; String? id;
String name; String? name;
String namen; String? namen;
List<LocalizedNames> localizedNames; List<LocalizedNames>? localizedNames;
dynamic description; dynamic description;
int parentCategoryId; int? parentCategoryId;
int displayOrder; int? displayOrder;
dynamic image; dynamic image;
bool isLeaf; bool? isLeaf;
CategoriseParentModel( CategoriseParentModel(
{this.id, {this.id,
@ -25,9 +25,9 @@ class CategoriseParentModel {
name = json['name']; name = json['name'];
namen = json['namen']; namen = json['namen'];
if (json['localized_names'] != null) { if (json['localized_names'] != null) {
localizedNames = new List<LocalizedNames>(); localizedNames = [];
json['localized_names'].forEach((v) { json['localized_names'].forEach((v) {
localizedNames.add(new LocalizedNames.fromJson(v)); localizedNames!.add(new LocalizedNames.fromJson(v));
}); });
} }
description = json['description']; description = json['description'];
@ -44,7 +44,7 @@ class CategoriseParentModel {
data['namen'] = this.namen; data['namen'] = this.namen;
if (this.localizedNames != null) { if (this.localizedNames != null) {
data['localized_names'] = data['localized_names'] =
this.localizedNames.map((v) => v.toJson()).toList(); this.localizedNames!.map((v) => v.toJson()).toList();
} }
data['description'] = this.description; data['description'] = this.description;
data['parent_category_id'] = this.parentCategoryId; data['parent_category_id'] = this.parentCategoryId;
@ -56,8 +56,8 @@ class CategoriseParentModel {
} }
class LocalizedNames { class LocalizedNames {
int languageId; int? languageId;
String localizedName; String? localizedName;
LocalizedNames({this.languageId, this.localizedName}); LocalizedNames({this.languageId, this.localizedName});

@ -1,21 +1,21 @@
class FinalProductsModel { class FinalProductsModel {
String id; String? id;
String name; String? name;
String namen; String? namen;
List<LocalizedNames> localizedNames; List<LocalizedNames>? localizedNames;
String shortDescription; String? shortDescription;
String fullDescription; String? fullDescription;
String fullDescriptionn; String? fullDescriptionn;
dynamic approvedRatingSum; dynamic approvedRatingSum;
dynamic approvedTotalReviews; dynamic approvedTotalReviews;
String sku; String? sku;
bool isRx; bool? isRx;
dynamic rxMessage; dynamic rxMessage;
dynamic rxMessagen; dynamic rxMessagen;
dynamic stockQuantity; dynamic stockQuantity;
String stockAvailability; String? stockAvailability;
String stockAvailabilityn; String? stockAvailabilityn;
bool allowBackInStockSubscriptions; bool? allowBackInStockSubscriptions;
dynamic orderMinimumQuantity; dynamic orderMinimumQuantity;
dynamic orderMaximumQuantity; dynamic orderMaximumQuantity;
dynamic price; dynamic price;
@ -24,9 +24,9 @@ class FinalProductsModel {
dynamic discountNamen; dynamic discountNamen;
dynamic discountPercentage; dynamic discountPercentage;
dynamic displayOrder; dynamic displayOrder;
List<dynamic> discountIds; List<dynamic>? discountIds;
List<dynamic> reviews; List<dynamic>? reviews;
List<Images> images; List<Images>? images;
FinalProductsModel( FinalProductsModel(
{this.id, {this.id,
@ -62,16 +62,16 @@ class FinalProductsModel {
id = json['id']; id = json['id'];
name = json['name']; name = json['name'];
if (json['images'] != null) { if (json['images'] != null) {
images = new List<Images>(); images = [];
json['images'].forEach((v) { json['images'].forEach((v) {
images.add(new Images.fromJson(v)); images!.add(new Images.fromJson(v));
}); });
} }
namen = json['namen']; namen = json['namen'];
if (json['localized_names'] != null) { if (json['localized_names'] != null) {
localizedNames = new List<LocalizedNames>(); localizedNames = [];
json['localized_names'].forEach((v) { json['localized_names'].forEach((v) {
localizedNames.add(new LocalizedNames.fromJson(v)); localizedNames!.add(new LocalizedNames.fromJson(v));
}); });
} }
shortDescription = json['short_description']; shortDescription = json['short_description'];
@ -104,7 +104,7 @@ class FinalProductsModel {
data['namen'] = this.namen; data['namen'] = this.namen;
if (this.localizedNames != null) { if (this.localizedNames != null) {
data['localized_names'] = data['localized_names'] =
this.localizedNames.map((v) => v.toJson()).toList(); this.localizedNames!.map((v) => v.toJson()).toList();
} }
data['short_description'] = this.shortDescription; data['short_description'] = this.shortDescription;
data['full_description'] = this.fullDescription; data['full_description'] = this.fullDescription;
@ -130,15 +130,15 @@ class FinalProductsModel {
data['display_order'] = this.displayOrder; data['display_order'] = this.displayOrder;
if (this.images != null) { if (this.images != null) {
data['images'] = this.images.map((v) => v.toJson()).toList(); data['images'] = this.images!.map((v) => v.toJson()).toList();
} }
return data; return data;
} }
} }
class LocalizedNames { class LocalizedNames {
int languageId; int? languageId;
String localizedName; String? localizedName;
LocalizedNames({this.languageId, this.localizedName}); LocalizedNames({this.languageId, this.localizedName});
@ -156,11 +156,11 @@ class LocalizedNames {
} }
class Images { class Images {
int id; int? id;
int position; int? position;
String src; String? src;
String thumb; String? thumb;
String attachment; String? attachment;
Images({this.id, this.position, this.src, this.thumb, this.attachment}); Images({this.id, this.position, this.src, this.thumb, this.attachment});

@ -1,90 +1,90 @@
class OfferProductsModel { class OfferProductsModel {
String id; String? id;
bool visibleIndividually; bool? visibleIndividually;
String name; String? name;
String namen; String? namen;
List<LocalizedNames> localizedNames; List<LocalizedNames>? localizedNames;
String shortDescription; String? shortDescription;
String shortDescriptionn; String? shortDescriptionn;
String fullDescription; String? fullDescription;
String fullDescriptionn; String? fullDescriptionn;
bool markasNew; bool? markasNew;
bool showOnHomePage; bool? showOnHomePage;
dynamic metaKeywords; dynamic metaKeywords;
dynamic metaDescription; dynamic metaDescription;
dynamic metaTitle; dynamic metaTitle;
bool allowCustomerReviews; bool? allowCustomerReviews;
dynamic approvedRatingSum; dynamic approvedRatingSum;
dynamic notApprovedRatingSum; dynamic notApprovedRatingSum;
dynamic approvedTotalReviews; dynamic approvedTotalReviews;
dynamic notApprovedTotalReviews; dynamic notApprovedTotalReviews;
String sku; String? sku;
bool isRx; bool? isRx;
bool prescriptionRequired; bool? prescriptionRequired;
dynamic rxMessage; dynamic rxMessage;
dynamic rxMessagen; dynamic rxMessagen;
dynamic manufacturerPartNumber; dynamic manufacturerPartNumber;
dynamic gtin; dynamic gtin;
bool isGiftCard; bool? isGiftCard;
bool requireOtherProducts; bool? requireOtherProducts;
bool automaticallyAddRequiredProducts; bool? automaticallyAddRequiredProducts;
bool isDownload; bool? isDownload;
bool unlimitedDownloads; bool? unlimitedDownloads;
dynamic maxNumberOfDownloads; dynamic maxNumberOfDownloads;
dynamic downloadExpirationDays; dynamic downloadExpirationDays;
bool hasSampleDownload; bool? hasSampleDownload;
bool hasUserAgreement; bool? hasUserAgreement;
bool isRecurring; bool? isRecurring;
dynamic recurringCycleLength; dynamic recurringCycleLength;
dynamic recurringTotalCycles; dynamic recurringTotalCycles;
bool isRental; bool? isRental;
dynamic rentalPriceLength; dynamic rentalPriceLength;
bool isShipEnabled; bool? isShipEnabled;
bool isFreeShipping; bool? isFreeShipping;
bool shipSeparately; bool? shipSeparately;
dynamic additionalShippingCharge; dynamic additionalShippingCharge;
bool isTaxExempt; bool? isTaxExempt;
bool isTelecommunicationsOrBroadcastingOrElectronicServices; bool? isTelecommunicationsOrBroadcastingOrElectronicServices;
bool useMultipleWarehouses; bool? useMultipleWarehouses;
dynamic manageInventoryMethodId; dynamic manageInventoryMethodId;
dynamic stockQuantity; dynamic stockQuantity;
String stockAvailability; String? stockAvailability;
String stockAvailabilityn; String? stockAvailabilityn;
bool displayStockAvailability; bool? displayStockAvailability;
bool displayStockQuantity; bool? displayStockQuantity;
dynamic minStockQuantity; dynamic minStockQuantity;
dynamic notifyAdminForQuantityBelow; dynamic notifyAdminForQuantityBelow;
bool allowBackInStockSubscriptions; bool? allowBackInStockSubscriptions;
dynamic orderMinimumQuantity; dynamic orderMinimumQuantity;
dynamic orderMaximumQuantity; dynamic orderMaximumQuantity;
dynamic allowedQuantities; dynamic allowedQuantities;
bool allowAddingOnlyExistingAttributeCombinations; bool? allowAddingOnlyExistingAttributeCombinations;
bool disableBuyButton; bool? disableBuyButton;
bool disableWishlistButton; bool? disableWishlistButton;
bool availableForPreOrder; bool? availableForPreOrder;
dynamic preOrderAvailabilityStartDateTimeUtc; dynamic preOrderAvailabilityStartDateTimeUtc;
bool callForPrice; bool? callForPrice;
dynamic price; dynamic price;
dynamic oldPrice; dynamic oldPrice;
dynamic productCost; dynamic productCost;
dynamic specialPrice; dynamic specialPrice;
dynamic specialPriceStartDateTimeUtc; dynamic specialPriceStartDateTimeUtc;
dynamic specialPriceEndDateTimeUtc; dynamic specialPriceEndDateTimeUtc;
bool customerEntersPrice; bool? customerEntersPrice;
dynamic minimumCustomerEnteredPrice; dynamic minimumCustomerEnteredPrice;
dynamic maximumCustomerEnteredPrice; dynamic maximumCustomerEnteredPrice;
bool basepriceEnabled; bool? basepriceEnabled;
dynamic basepriceAmount; dynamic basepriceAmount;
dynamic basepriceBaseAmount; dynamic basepriceBaseAmount;
bool hasTierPrices; bool? hasTierPrices;
bool hasDiscountsApplied; bool? hasDiscountsApplied;
String discountName; String? discountName;
String discountNamen; String? discountNamen;
String discountDescription; String? discountDescription;
String discountDescriptionn; String? discountDescriptionn;
dynamic discountPercentage; dynamic discountPercentage;
String currency; String? currency;
String currencyn; String? currencyn;
dynamic weight; dynamic weight;
dynamic length; dynamic length;
dynamic width; dynamic width;
@ -92,24 +92,24 @@ class OfferProductsModel {
dynamic availableStartDateTimeUtc; dynamic availableStartDateTimeUtc;
dynamic availableEndDateTimeUtc; dynamic availableEndDateTimeUtc;
dynamic displayOrder; dynamic displayOrder;
bool published; bool? published;
bool deleted; bool? deleted;
String createdOnUtc; String? createdOnUtc;
String updatedOnUtc; String? updatedOnUtc;
String productType; String? productType;
dynamic parentGroupedProductId; dynamic parentGroupedProductId;
List<dynamic> roleIds; List<dynamic>? roleIds;
List<dynamic> discountIds; List<dynamic>? discountIds;
List<dynamic> storeIds; List<dynamic>? storeIds;
List<dynamic> manufacturerIds; List<dynamic>? manufacturerIds;
List<dynamic> reviews; List<dynamic>? reviews;
List<Images> images; List<Images>? images;
List<dynamic> attributes; List<dynamic>? attributes;
List<Specifications> specifications; List<Specifications>? specifications;
List<dynamic> associatedProductIds; List<dynamic>? associatedProductIds;
List<dynamic> tags; List<dynamic>? tags;
dynamic vendorId; dynamic vendorId;
String seName; String? seName;
OfferProductsModel( OfferProductsModel(
{this.id, {this.id,
@ -230,9 +230,9 @@ class OfferProductsModel {
name = json['name']; name = json['name'];
namen = json['namen']; namen = json['namen'];
if (json['localized_names'] != null) { if (json['localized_names'] != null) {
localizedNames = new List<LocalizedNames>(); localizedNames = [];
json['localized_names'].forEach((v) { json['localized_names'].forEach((v) {
localizedNames.add(new LocalizedNames.fromJson(v)); localizedNames!.add(new LocalizedNames.fromJson(v));
}); });
} }
shortDescription = json['short_description']; shortDescription = json['short_description'];
@ -337,9 +337,9 @@ class OfferProductsModel {
discountIds = json['discount_ids'].cast<int>(); discountIds = json['discount_ids'].cast<int>();
if (json['images'] != null) { if (json['images'] != null) {
images = new List<Images>(); images = [];
json['images'].forEach((v) { json['images'].forEach((v) {
images.add(new Images.fromJson(v)); images!.add(new Images.fromJson(v));
}); });
} }
@ -355,7 +355,7 @@ class OfferProductsModel {
data['namen'] = this.namen; data['namen'] = this.namen;
if (this.localizedNames != null) { if (this.localizedNames != null) {
data['localized_names'] = data['localized_names'] =
this.localizedNames.map((v) => v.toJson()).toList(); this.localizedNames!.map((v) => v.toJson()).toList();
} }
data['short_description'] = this.shortDescription; data['short_description'] = this.shortDescription;
data['short_descriptionn'] = this.shortDescriptionn; data['short_descriptionn'] = this.shortDescriptionn;
@ -458,35 +458,35 @@ class OfferProductsModel {
data['product_type'] = this.productType; data['product_type'] = this.productType;
data['parent_grouped_product_id'] = this.parentGroupedProductId; data['parent_grouped_product_id'] = this.parentGroupedProductId;
if (this.roleIds != null) { if (this.roleIds != null) {
data['role_ids'] = this.roleIds.map((v) => v.toJson()).toList(); data['role_ids'] = this.roleIds!.map((v) => v.toJson()).toList();
} }
data['discount_ids'] = this.discountIds; data['discount_ids'] = this.discountIds;
if (this.storeIds != null) { if (this.storeIds != null) {
data['store_ids'] = this.storeIds.map((v) => v.toJson()).toList(); data['store_ids'] = this.storeIds!.map((v) => v.toJson()).toList();
} }
if (this.manufacturerIds != null) { if (this.manufacturerIds != null) {
data['manufacturer_ids'] = data['manufacturer_ids'] =
this.manufacturerIds.map((v) => v.toJson()).toList(); this.manufacturerIds!.map((v) => v.toJson()).toList();
} }
if (this.reviews != null) { if (this.reviews != null) {
data['reviews'] = this.reviews.map((v) => v.toJson()).toList(); data['reviews'] = this.reviews!.map((v) => v.toJson()).toList();
} }
if (this.images != null) { if (this.images != null) {
data['images'] = this.images.map((v) => v.toJson()).toList(); data['images'] = this.images!.map((v) => v.toJson()).toList();
} }
if (this.attributes != null) { if (this.attributes != null) {
data['attributes'] = this.attributes.map((v) => v.toJson()).toList(); data['attributes'] = this.attributes!.map((v) => v.toJson()).toList();
} }
if (this.specifications != null) { if (this.specifications != null) {
data['specifications'] = data['specifications'] =
this.specifications.map((v) => v.toJson()).toList(); this.specifications!.map((v) => v.toJson()).toList();
} }
if (this.associatedProductIds != null) { if (this.associatedProductIds != null) {
data['associated_product_ids'] = data['associated_product_ids'] =
this.associatedProductIds.map((v) => v.toJson()).toList(); this.associatedProductIds!.map((v) => v.toJson()).toList();
} }
if (this.tags != null) { if (this.tags != null) {
data['tags'] = this.tags.map((v) => v.toJson()).toList(); data['tags'] = this.tags!.map((v) => v.toJson()).toList();
} }
data['vendor_id'] = this.vendorId; data['vendor_id'] = this.vendorId;
data['se_name'] = this.seName; data['se_name'] = this.seName;
@ -495,8 +495,8 @@ class OfferProductsModel {
} }
class LocalizedNames { class LocalizedNames {
int languageId; int? languageId;
String localizedName; String? localizedName;
LocalizedNames({this.languageId, this.localizedName}); LocalizedNames({this.languageId, this.localizedName});
@ -514,11 +514,11 @@ class LocalizedNames {
} }
class Images { class Images {
int id; int? id;
int position; int? position;
String src; String? src;
String thumb; String? thumb;
String attachment; String? attachment;
Images({this.id, this.position, this.src, this.thumb, this.attachment}); Images({this.id, this.position, this.src, this.thumb, this.attachment});
@ -542,12 +542,12 @@ class Images {
} }
class Specifications { class Specifications {
int id; int? id;
int displayOrder; int? displayOrder;
String defaultValue; String? defaultValue;
String defaultValuen; String? defaultValuen;
String name; String? name;
String nameN; String? nameN;
Specifications( Specifications(
{this.id, {this.id,

@ -1,31 +1,31 @@
class OffersModel { class OffersModel {
String id; String? id;
String name; String? name;
String namen; String? namen;
List<LocalizedNames> localizedNames; List<LocalizedNames>? localizedNames;
Null description; Null description;
int categoryTemplateId; int? categoryTemplateId;
String metaKeywords; String? metaKeywords;
String metaDescription; String? metaDescription;
String metaTitle; String? metaTitle;
int parentCategoryId; int? parentCategoryId;
int pageSize; int? pageSize;
String pageSizeOptions; String? pageSizeOptions;
Null priceRanges; Null priceRanges;
bool showOnHomePage; bool? showOnHomePage;
bool includeInTopMenu; bool? includeInTopMenu;
Null hasDiscountsApplied; Null hasDiscountsApplied;
bool published; bool? published;
bool deleted; bool? deleted;
int displayOrder; int? displayOrder;
String createdOnUtc; String? createdOnUtc;
String updatedOnUtc; String? updatedOnUtc;
List<dynamic> roleIds; List<dynamic>? roleIds;
List<dynamic> discountIds; List<dynamic>? discountIds;
List<dynamic> storeIds; List<dynamic>? storeIds;
Image image; Image? image;
String seName; String? seName;
bool isLeaf; bool? isLeaf;
OffersModel( OffersModel(
{this.id, {this.id,
@ -61,9 +61,9 @@ class OffersModel {
name = json['name']; name = json['name'];
namen = json['namen']; namen = json['namen'];
if (json['localized_names'] != null) { if (json['localized_names'] != null) {
localizedNames = new List<LocalizedNames>(); localizedNames =[];
json['localized_names'].forEach((v) { json['localized_names'].forEach((v) {
localizedNames.add(new LocalizedNames.fromJson(v)); localizedNames!.add(new LocalizedNames.fromJson(v));
}); });
} }
description = json['description']; description = json['description'];
@ -96,7 +96,7 @@ class OffersModel {
data['namen'] = this.namen; data['namen'] = this.namen;
if (this.localizedNames != null) { if (this.localizedNames != null) {
data['localized_names'] = data['localized_names'] =
this.localizedNames.map((v) => v.toJson()).toList(); this.localizedNames!.map((v) => v.toJson()).toList();
} }
data['description'] = this.description; data['description'] = this.description;
data['category_template_id'] = this.categoryTemplateId; data['category_template_id'] = this.categoryTemplateId;
@ -116,16 +116,16 @@ class OffersModel {
data['created_on_utc'] = this.createdOnUtc; data['created_on_utc'] = this.createdOnUtc;
data['updated_on_utc'] = this.updatedOnUtc; data['updated_on_utc'] = this.updatedOnUtc;
if (this.roleIds != null) { if (this.roleIds != null) {
data['role_ids'] = this.roleIds.map((v) => v.toJson()).toList(); data['role_ids'] = this.roleIds!.map((v) => v.toJson()).toList();
} }
if (this.discountIds != null) { if (this.discountIds != null) {
data['discount_ids'] = this.discountIds.map((v) => v.toJson()).toList(); data['discount_ids'] = this.discountIds!.map((v) => v.toJson()).toList();
} }
if (this.storeIds != null) { if (this.storeIds != null) {
data['store_ids'] = this.storeIds.map((v) => v.toJson()).toList(); data['store_ids'] = this.storeIds!.map((v) => v.toJson()).toList();
} }
if (this.image != null) { if (this.image != null) {
data['image'] = this.image.toJson(); data['image'] = this.image!.toJson();
} }
data['se_name'] = this.seName; data['se_name'] = this.seName;
data['is_leaf'] = this.isLeaf; data['is_leaf'] = this.isLeaf;
@ -134,8 +134,8 @@ class OffersModel {
} }
class LocalizedNames { class LocalizedNames {
int languageId; int? languageId;
String localizedName; String? localizedName;
LocalizedNames({this.languageId, this.localizedName}); LocalizedNames({this.languageId, this.localizedName});
@ -153,7 +153,7 @@ class LocalizedNames {
} }
class Image { class Image {
String src; String? src;
Null thumb; Null thumb;
Null attachment; Null attachment;

@ -3,7 +3,7 @@ class ParentProductsModel {
dynamic visibleIndividually; dynamic visibleIndividually;
dynamic name; dynamic name;
dynamic namen; dynamic namen;
List<LocalizedNames> localizedNames; List<LocalizedNames>? localizedNames;
dynamic shortDescription; dynamic shortDescription;
dynamic shortDescriptionn; dynamic shortDescriptionn;
dynamic fullDescription; dynamic fullDescription;
@ -98,18 +98,18 @@ class ParentProductsModel {
dynamic updatedOnUtc; dynamic updatedOnUtc;
dynamic productType; dynamic productType;
dynamic parentGroupedProductId; dynamic parentGroupedProductId;
List<dynamic> roleIds; List<dynamic>? roleIds;
List<dynamic> discountIds; List<dynamic>? discountIds;
List<dynamic> storeIds; List<dynamic>? storeIds;
List<dynamic> manufacturerIds; List<dynamic>? manufacturerIds;
List<dynamic> reviews; List<dynamic>? reviews;
List<Images> images; List<Images>? images;
List<dynamic> attributes; List<dynamic>? attributes;
List<Specifications> specifications; List<Specifications>? specifications;
List<dynamic> associatedProductIds; List<dynamic>? associatedProductIds;
List<dynamic> tags; List<dynamic>? tags;
dynamic vendorId; dynamic vendorId;
String seName; String? seName;
ParentProductsModel( ParentProductsModel(
{this.id, {this.id,
@ -229,16 +229,16 @@ class ParentProductsModel {
visibleIndividually = json['visible_individually']; visibleIndividually = json['visible_individually'];
name = json['name']; name = json['name'];
if (json['images'] != null) { if (json['images'] != null) {
images = new List<Images>(); images = [];
json['images'].forEach((v) { json['images'].forEach((v) {
images.add(new Images.fromJson(v)); images!.add(new Images.fromJson(v));
}); });
} }
namen = json['namen']; namen = json['namen'];
if (json['localized_names'] != null) { if (json['localized_names'] != null) {
localizedNames = new List<LocalizedNames>(); localizedNames = [];
json['localized_names'].forEach((v) { json['localized_names'].forEach((v) {
localizedNames.add(new LocalizedNames.fromJson(v)); localizedNames!.add(new LocalizedNames.fromJson(v));
}); });
} }
shortDescription = json['short_description']; shortDescription = json['short_description'];
@ -264,8 +264,7 @@ class ParentProductsModel {
gtin = json['gtin']; gtin = json['gtin'];
isGiftCard = json['is_gift_card']; isGiftCard = json['is_gift_card'];
requireOtherProducts = json['require_other_products']; requireOtherProducts = json['require_other_products'];
automaticallyAddRequiredProducts = automaticallyAddRequiredProducts = json['automatically_add_required_products'];
json['automatically_add_required_products'];
isDownload = json['is_download']; isDownload = json['is_download'];
unlimitedDownloads = json['unlimited_downloads']; unlimitedDownloads = json['unlimited_downloads'];
maxNumberOfDownloads = json['max_number_of_downloads']; maxNumberOfDownloads = json['max_number_of_downloads'];
@ -282,8 +281,7 @@ class ParentProductsModel {
shipSeparately = json['ship_separately']; shipSeparately = json['ship_separately'];
additionalShippingCharge = json['additional_shipping_charge']; additionalShippingCharge = json['additional_shipping_charge'];
isTaxExempt = json['is_tax_exempt']; isTaxExempt = json['is_tax_exempt'];
isTelecommunicationsOrBroadcastingOrElectronicServices = isTelecommunicationsOrBroadcastingOrElectronicServices = json['is_telecommunications_or_broadcasting_or_electronic_services'];
json['is_telecommunications_or_broadcasting_or_electronic_services'];
useMultipleWarehouses = json['use_multiple_warehouses']; useMultipleWarehouses = json['use_multiple_warehouses'];
manageInventoryMethodId = json['manage_inventory_method_id']; manageInventoryMethodId = json['manage_inventory_method_id'];
stockQuantity = json['stock_quantity']; stockQuantity = json['stock_quantity'];
@ -297,13 +295,11 @@ class ParentProductsModel {
orderMinimumQuantity = json['order_minimum_quantity']; orderMinimumQuantity = json['order_minimum_quantity'];
orderMaximumQuantity = json['order_maximum_quantity']; orderMaximumQuantity = json['order_maximum_quantity'];
allowedQuantities = json['allowed_quantities']; allowedQuantities = json['allowed_quantities'];
allowAddingOnlyExistingAttributeCombinations = allowAddingOnlyExistingAttributeCombinations = json['allow_adding_only_existing_attribute_combinations'];
json['allow_adding_only_existing_attribute_combinations'];
disableBuyButton = json['disable_buy_button']; disableBuyButton = json['disable_buy_button'];
disableWishlistButton = json['disable_wishlist_button']; disableWishlistButton = json['disable_wishlist_button'];
availableForPreOrder = json['available_for_pre_order']; availableForPreOrder = json['available_for_pre_order'];
preOrderAvailabilityStartDateTimeUtc = preOrderAvailabilityStartDateTimeUtc = json['pre_order_availability_start_date_time_utc'];
json['pre_order_availability_start_date_time_utc'];
callForPrice = json['call_for_price']; callForPrice = json['call_for_price'];
price = json['price']; price = json['price'];
oldPrice = json['old_price']; oldPrice = json['old_price'];
@ -343,9 +339,9 @@ class ParentProductsModel {
manufacturerIds = json['manufacturer_ids'].cast<int>(); manufacturerIds = json['manufacturer_ids'].cast<int>();
if (json['specifications'] != null) { if (json['specifications'] != null) {
specifications = new List<Specifications>(); specifications = [];
json['specifications'].forEach((v) { json['specifications'].forEach((v) {
specifications.add(new Specifications.fromJson(v)); specifications!.add(new Specifications.fromJson(v));
}); });
} }
@ -360,8 +356,7 @@ class ParentProductsModel {
data['name'] = this.name; data['name'] = this.name;
data['namen'] = this.namen; data['namen'] = this.namen;
if (this.localizedNames != null) { if (this.localizedNames != null) {
data['localized_names'] = data['localized_names'] = this.localizedNames!.map((v) => v.toJson()).toList();
this.localizedNames.map((v) => v.toJson()).toList();
} }
data['short_description'] = this.shortDescription; data['short_description'] = this.shortDescription;
data['short_descriptionn'] = this.shortDescriptionn; data['short_descriptionn'] = this.shortDescriptionn;
@ -386,8 +381,7 @@ class ParentProductsModel {
data['gtin'] = this.gtin; data['gtin'] = this.gtin;
data['is_gift_card'] = this.isGiftCard; data['is_gift_card'] = this.isGiftCard;
data['require_other_products'] = this.requireOtherProducts; data['require_other_products'] = this.requireOtherProducts;
data['automatically_add_required_products'] = data['automatically_add_required_products'] = this.automaticallyAddRequiredProducts;
this.automaticallyAddRequiredProducts;
data['is_download'] = this.isDownload; data['is_download'] = this.isDownload;
data['unlimited_downloads'] = this.unlimitedDownloads; data['unlimited_downloads'] = this.unlimitedDownloads;
data['max_number_of_downloads'] = this.maxNumberOfDownloads; data['max_number_of_downloads'] = this.maxNumberOfDownloads;
@ -404,8 +398,7 @@ class ParentProductsModel {
data['ship_separately'] = this.shipSeparately; data['ship_separately'] = this.shipSeparately;
data['additional_shipping_charge'] = this.additionalShippingCharge; data['additional_shipping_charge'] = this.additionalShippingCharge;
data['is_tax_exempt'] = this.isTaxExempt; data['is_tax_exempt'] = this.isTaxExempt;
data['is_telecommunications_or_broadcasting_or_electronic_services'] = data['is_telecommunications_or_broadcasting_or_electronic_services'] = this.isTelecommunicationsOrBroadcastingOrElectronicServices;
this.isTelecommunicationsOrBroadcastingOrElectronicServices;
data['use_multiple_warehouses'] = this.useMultipleWarehouses; data['use_multiple_warehouses'] = this.useMultipleWarehouses;
data['manage_inventory_method_id'] = this.manageInventoryMethodId; data['manage_inventory_method_id'] = this.manageInventoryMethodId;
data['stock_quantity'] = this.stockQuantity; data['stock_quantity'] = this.stockQuantity;
@ -415,25 +408,21 @@ class ParentProductsModel {
data['display_stock_quantity'] = this.displayStockQuantity; data['display_stock_quantity'] = this.displayStockQuantity;
data['min_stock_quantity'] = this.minStockQuantity; data['min_stock_quantity'] = this.minStockQuantity;
data['notify_admin_for_quantity_below'] = this.notifyAdminForQuantityBelow; data['notify_admin_for_quantity_below'] = this.notifyAdminForQuantityBelow;
data['allow_back_in_stock_subscriptions'] = data['allow_back_in_stock_subscriptions'] = this.allowBackInStockSubscriptions;
this.allowBackInStockSubscriptions;
data['order_minimum_quantity'] = this.orderMinimumQuantity; data['order_minimum_quantity'] = this.orderMinimumQuantity;
data['order_maximum_quantity'] = this.orderMaximumQuantity; data['order_maximum_quantity'] = this.orderMaximumQuantity;
data['allowed_quantities'] = this.allowedQuantities; data['allowed_quantities'] = this.allowedQuantities;
data['allow_adding_only_existing_attribute_combinations'] = data['allow_adding_only_existing_attribute_combinations'] = this.allowAddingOnlyExistingAttributeCombinations;
this.allowAddingOnlyExistingAttributeCombinations;
data['disable_buy_button'] = this.disableBuyButton; data['disable_buy_button'] = this.disableBuyButton;
data['disable_wishlist_button'] = this.disableWishlistButton; data['disable_wishlist_button'] = this.disableWishlistButton;
data['available_for_pre_order'] = this.availableForPreOrder; data['available_for_pre_order'] = this.availableForPreOrder;
data['pre_order_availability_start_date_time_utc'] = data['pre_order_availability_start_date_time_utc'] = this.preOrderAvailabilityStartDateTimeUtc;
this.preOrderAvailabilityStartDateTimeUtc;
data['call_for_price'] = this.callForPrice; data['call_for_price'] = this.callForPrice;
data['price'] = this.price; data['price'] = this.price;
data['old_price'] = this.oldPrice; data['old_price'] = this.oldPrice;
data['product_cost'] = this.productCost; data['product_cost'] = this.productCost;
data['special_price'] = this.specialPrice; data['special_price'] = this.specialPrice;
data['special_price_start_date_time_utc'] = data['special_price_start_date_time_utc'] = this.specialPriceStartDateTimeUtc;
this.specialPriceStartDateTimeUtc;
data['special_price_end_date_time_utc'] = this.specialPriceEndDateTimeUtc; data['special_price_end_date_time_utc'] = this.specialPriceEndDateTimeUtc;
data['customer_enters_price'] = this.customerEntersPrice; data['customer_enters_price'] = this.customerEntersPrice;
data['minimum_customer_entered_price'] = this.minimumCustomerEnteredPrice; data['minimum_customer_entered_price'] = this.minimumCustomerEnteredPrice;
@ -467,12 +456,11 @@ class ParentProductsModel {
data['manufacturer_ids'] = this.manufacturerIds; data['manufacturer_ids'] = this.manufacturerIds;
if (this.images != null) { if (this.images != null) {
data['images'] = this.images.map((v) => v.toJson()).toList(); data['images'] = this.images!.map((v) => v.toJson()).toList();
} }
if (this.specifications != null) { if (this.specifications != null) {
data['specifications'] = data['specifications'] = this.specifications!.map((v) => v.toJson()).toList();
this.specifications.map((v) => v.toJson()).toList();
} }
data['vendor_id'] = this.vendorId; data['vendor_id'] = this.vendorId;
@ -482,8 +470,8 @@ class ParentProductsModel {
} }
class LocalizedNames { class LocalizedNames {
int languageId; int? languageId;
String localizedName; String? localizedName;
LocalizedNames({this.languageId, this.localizedName}); LocalizedNames({this.languageId, this.localizedName});
@ -501,11 +489,11 @@ class LocalizedNames {
} }
class Images { class Images {
int id; int? id;
int position; int? position;
String src; String? src;
String thumb; String? thumb;
String attachment; String? attachment;
Images({this.id, this.position, this.src, this.thumb, this.attachment}); Images({this.id, this.position, this.src, this.thumb, this.attachment});
@ -529,20 +517,14 @@ class Images {
} }
class Specifications { class Specifications {
int id; int? id;
int displayOrder; int? displayOrder;
String defaultValue; String? defaultValue;
String defaultValuen; String? defaultValuen;
String name; String? name;
String nameN; String? nameN;
Specifications( Specifications({this.id, this.displayOrder, this.defaultValue, this.defaultValuen, this.name, this.nameN});
{this.id,
this.displayOrder,
this.defaultValue,
this.defaultValuen,
this.name,
this.nameN});
Specifications.fromJson(Map<String, dynamic> json) { Specifications.fromJson(Map<String, dynamic> json) {
id = json['id']; id = json['id'];

@ -1,24 +1,15 @@
class PharmacyCategorise { class PharmacyCategorise {
dynamic id; dynamic id;
String name; String? name;
dynamic namen; dynamic namen;
List<LocalizedNames> localizedNames; List<LocalizedNames>? localizedNames;
dynamic description; dynamic description;
dynamic parentCategoryId; dynamic parentCategoryId;
dynamic displayOrder; dynamic displayOrder;
dynamic image; dynamic image;
dynamic isLeaf; dynamic isLeaf;
PharmacyCategorise( PharmacyCategorise({this.id, this.name, this.namen, this.localizedNames, this.description, this.parentCategoryId, this.displayOrder, this.image, this.isLeaf});
{this.id,
this.name,
this.namen,
this.localizedNames,
this.description,
this.parentCategoryId,
this.displayOrder,
this.image,
this.isLeaf});
PharmacyCategorise.fromJson(Map<String, dynamic> json) { PharmacyCategorise.fromJson(Map<String, dynamic> json) {
try { try {
@ -26,9 +17,9 @@ class PharmacyCategorise {
name = json['name']; name = json['name'];
namen = json['namen']; namen = json['namen'];
if (json['localized_names'] != null) { if (json['localized_names'] != null) {
localizedNames = new List<LocalizedNames>(); localizedNames = [];
json['localized_names'].forEach((v) { json['localized_names'].forEach((v) {
localizedNames.add(new LocalizedNames.fromJson(v)); localizedNames!.add(new LocalizedNames.fromJson(v));
}); });
} }
description = json['description']; description = json['description'];
@ -47,8 +38,7 @@ class PharmacyCategorise {
data['name'] = this.name; data['name'] = this.name;
data['namen'] = this.namen; data['namen'] = this.namen;
if (this.localizedNames != null) { if (this.localizedNames != null) {
data['localized_names'] = data['localized_names'] = this.localizedNames!.map((v) => v.toJson()).toList();
this.localizedNames.map((v) => v.toJson()).toList();
} }
data['description'] = this.description; data['description'] = this.description;
data['parent_category_id'] = this.parentCategoryId; data['parent_category_id'] = this.parentCategoryId;
@ -62,8 +52,8 @@ class PharmacyCategorise {
} }
class LocalizedNames { class LocalizedNames {
int languageId; int? languageId;
String localizedName; String? localizedName;
LocalizedNames({this.languageId, this.localizedName}); LocalizedNames({this.languageId, this.localizedName});
@ -81,7 +71,7 @@ class LocalizedNames {
} }
class Image { class Image {
String src; String? src;
Null thumb; Null thumb;
Null attachment; Null attachment;

@ -1,115 +1,115 @@
class ScanQrModel { class ScanQrModel {
String id; String? id;
bool visibleIndividually; bool? visibleIndividually;
String name; String? name;
String namen; String? namen;
List<LocalizedNames> localizedNames; List<LocalizedNames>? localizedNames;
String shortDescription; String? shortDescription;
String shortDescriptionn; String? shortDescriptionn;
String fullDescription; String? fullDescription;
String fullDescriptionn; String? fullDescriptionn;
bool markasNew; bool? markasNew;
bool showOnHomePage; bool? showOnHomePage;
dynamic metaKeywords; dynamic metaKeywords;
dynamic metaDescription; dynamic metaDescription;
dynamic metaTitle; dynamic metaTitle;
bool allowCustomerReviews; bool? allowCustomerReviews;
dynamic approvedRatingSum; dynamic approvedRatingSum;
dynamic notApprovedRatingSum; dynamic notApprovedRatingSum;
dynamic approvedTotalReviews; dynamic approvedTotalReviews;
dynamic notApprovedTotalReviews; dynamic notApprovedTotalReviews;
String sku; String? sku;
bool isRx; bool? isRx;
bool prescriptionRequired; bool? prescriptionRequired;
dynamic rxMessage; dynamic rxMessage;
dynamic rxMessagen; dynamic rxMessagen;
dynamic manufacturerPartNumber; dynamic manufacturerPartNumber;
dynamic gtin; dynamic gtin;
bool isGiftCard; bool? isGiftCard;
bool requireOtherProducts; bool? requireOtherProducts;
bool automaticallyAddRequiredProducts; bool? automaticallyAddRequiredProducts;
bool isDownload; bool? isDownload;
bool unlimitedDownloads; bool? unlimitedDownloads;
dynamic maxNumberOfDownloads; dynamic maxNumberOfDownloads;
dynamic downloadExpirationDays; dynamic downloadExpirationDays;
bool hasSampleDownload; bool? hasSampleDownload;
bool hasUserAgreement; bool? hasUserAgreement;
bool isRecurring; bool? isRecurring;
dynamic recurringCycleLength; dynamic recurringCycleLength;
dynamic recurringTotalCycles; dynamic recurringTotalCycles;
bool isRental; bool? isRental;
dynamic rentalPriceLength; dynamic rentalPriceLength;
bool isShipEnabled; bool? isShipEnabled;
bool isFreeShipping; bool? isFreeShipping;
bool shipSeparately; bool? shipSeparately;
dynamic additionalShippingCharge; dynamic additionalShippingCharge;
bool isTaxExempt; bool? isTaxExempt;
bool isTelecommunicationsOrBroadcastingOrElectronicServices; bool? isTelecommunicationsOrBroadcastingOrElectronicServices;
bool useMultipleWarehouses; bool? useMultipleWarehouses;
dynamic manageInventoryMethodId; dynamic manageInventoryMethodId;
dynamic stockQuantity; dynamic stockQuantity;
String stockAvailability; String? stockAvailability;
String stockAvailabilityn; String? stockAvailabilityn;
bool displayStockAvailability; bool? displayStockAvailability;
bool displayStockQuantity; bool? displayStockQuantity;
dynamic minStockQuantity; dynamic minStockQuantity;
dynamic notifyAdminForQuantityBelow; dynamic notifyAdminForQuantityBelow;
bool allowBackInStockSubscriptions; bool? allowBackInStockSubscriptions;
dynamic orderMinimumQuantity; dynamic orderMinimumQuantity;
dynamic orderMaximumQuantity; dynamic orderMaximumQuantity;
dynamic allowedQuantities; dynamic allowedQuantities;
bool allowAddingOnlyExistingAttributeCombinations; bool? allowAddingOnlyExistingAttributeCombinations;
bool disableBuyButton; bool? disableBuyButton;
bool disableWishlistButton; bool? disableWishlistButton;
bool availableForPreOrder; bool? availableForPreOrder;
dynamic preOrderAvailabilityStartDateTimeUtc; dynamic preOrderAvailabilityStartDateTimeUtc;
bool callForPrice; bool? callForPrice;
dynamic price; dynamic price;
dynamic oldPrice; dynamic oldPrice;
dynamic productCost; dynamic productCost;
dynamic specialPrice; dynamic specialPrice;
dynamic specialPriceStartDateTimeUtc; dynamic specialPriceStartDateTimeUtc;
dynamic specialPriceEndDateTimeUtc; dynamic specialPriceEndDateTimeUtc;
bool customerEntersPrice; bool? customerEntersPrice;
dynamic minimumCustomerEnteredPrice; dynamic minimumCustomerEnteredPrice;
dynamic maximumCustomerEnteredPrice; dynamic maximumCustomerEnteredPrice;
bool basepriceEnabled; bool? basepriceEnabled;
dynamic basepriceAmount; dynamic basepriceAmount;
dynamic basepriceBaseAmount; dynamic basepriceBaseAmount;
bool hasTierPrices; bool? hasTierPrices;
bool hasDiscountsApplied; bool? hasDiscountsApplied;
dynamic discountName; dynamic discountName;
dynamic discountNamen; dynamic discountNamen;
dynamic discountDescription; dynamic discountDescription;
dynamic discountDescriptionn; dynamic discountDescriptionn;
dynamic discountPercentage; dynamic discountPercentage;
String currency; String? currency;
String currencyn; String? currencyn;
double weight; double? weight;
dynamic length; dynamic length;
dynamic width; dynamic width;
dynamic height; dynamic height;
dynamic availableStartDateTimeUtc; dynamic availableStartDateTimeUtc;
dynamic availableEndDateTimeUtc; dynamic availableEndDateTimeUtc;
dynamic displayOrder; dynamic displayOrder;
bool published; bool? published;
bool deleted; bool? deleted;
String createdOnUtc; String? createdOnUtc;
String updatedOnUtc; String? updatedOnUtc;
String productType; String? productType;
dynamic parentGroupedProductId; dynamic parentGroupedProductId;
List<dynamic> roleIds; List<dynamic>? roleIds;
List<dynamic> discountIds; List<dynamic>? discountIds;
List<dynamic> storeIds; List<dynamic>? storeIds;
List<dynamic> manufacturerIds; List<dynamic>? manufacturerIds;
List<dynamic> reviews; List<dynamic>? reviews;
List<Images> images; List<Images>? images;
List<dynamic> attributes; List<dynamic>? attributes;
List<Specifications> specifications; List<Specifications>? specifications;
List<dynamic> associatedProductIds; List<dynamic>? associatedProductIds;
List<dynamic> tags; List<dynamic>? tags;
dynamic vendorId; dynamic vendorId;
String seName; String? seName;
ScanQrModel( ScanQrModel(
{this.id, {this.id,
@ -230,9 +230,9 @@ class ScanQrModel {
name = json['name']; name = json['name'];
namen = json['namen']; namen = json['namen'];
if (json['localized_names'] != null) { if (json['localized_names'] != null) {
localizedNames = new List<LocalizedNames>(); localizedNames = [];
json['localized_names'].forEach((v) { json['localized_names'].forEach((v) {
localizedNames.add(new LocalizedNames.fromJson(v)); localizedNames!.add(new LocalizedNames.fromJson(v));
}); });
} }
shortDescription = json['short_description']; shortDescription = json['short_description'];
@ -258,8 +258,7 @@ class ScanQrModel {
gtin = json['gtin']; gtin = json['gtin'];
isGiftCard = json['is_gift_card']; isGiftCard = json['is_gift_card'];
requireOtherProducts = json['require_other_products']; requireOtherProducts = json['require_other_products'];
automaticallyAddRequiredProducts = automaticallyAddRequiredProducts = json['automatically_add_required_products'];
json['automatically_add_required_products'];
isDownload = json['is_download']; isDownload = json['is_download'];
unlimitedDownloads = json['unlimited_downloads']; unlimitedDownloads = json['unlimited_downloads'];
maxNumberOfDownloads = json['max_number_of_downloads']; maxNumberOfDownloads = json['max_number_of_downloads'];
@ -276,8 +275,7 @@ class ScanQrModel {
shipSeparately = json['ship_separately']; shipSeparately = json['ship_separately'];
additionalShippingCharge = json['additional_shipping_charge']; additionalShippingCharge = json['additional_shipping_charge'];
isTaxExempt = json['is_tax_exempt']; isTaxExempt = json['is_tax_exempt'];
isTelecommunicationsOrBroadcastingOrElectronicServices = isTelecommunicationsOrBroadcastingOrElectronicServices = json['is_telecommunications_or_broadcasting_or_electronic_services'];
json['is_telecommunications_or_broadcasting_or_electronic_services'];
useMultipleWarehouses = json['use_multiple_warehouses']; useMultipleWarehouses = json['use_multiple_warehouses'];
manageInventoryMethodId = json['manage_inventory_method_id']; manageInventoryMethodId = json['manage_inventory_method_id'];
stockQuantity = json['stock_quantity']; stockQuantity = json['stock_quantity'];
@ -291,13 +289,11 @@ class ScanQrModel {
orderMinimumQuantity = json['order_minimum_quantity']; orderMinimumQuantity = json['order_minimum_quantity'];
orderMaximumQuantity = json['order_maximum_quantity']; orderMaximumQuantity = json['order_maximum_quantity'];
allowedQuantities = json['allowed_quantities']; allowedQuantities = json['allowed_quantities'];
allowAddingOnlyExistingAttributeCombinations = allowAddingOnlyExistingAttributeCombinations = json['allow_adding_only_existing_attribute_combinations'];
json['allow_adding_only_existing_attribute_combinations'];
disableBuyButton = json['disable_buy_button']; disableBuyButton = json['disable_buy_button'];
disableWishlistButton = json['disable_wishlist_button']; disableWishlistButton = json['disable_wishlist_button'];
availableForPreOrder = json['available_for_pre_order']; availableForPreOrder = json['available_for_pre_order'];
preOrderAvailabilityStartDateTimeUtc = preOrderAvailabilityStartDateTimeUtc = json['pre_order_availability_start_date_time_utc'];
json['pre_order_availability_start_date_time_utc'];
callForPrice = json['call_for_price']; callForPrice = json['call_for_price'];
price = json['price']; price = json['price'];
oldPrice = json['old_price']; oldPrice = json['old_price'];
@ -334,38 +330,38 @@ class ScanQrModel {
productType = json['product_type']; productType = json['product_type'];
parentGroupedProductId = json['parent_grouped_product_id']; parentGroupedProductId = json['parent_grouped_product_id'];
if (json['role_ids'] != null) { if (json['role_ids'] != null) {
roleIds = new List<Null>(); roleIds = [];
} }
if (json['discount_ids'] != null) { if (json['discount_ids'] != null) {
discountIds = new List<Null>(); discountIds = [];
} }
if (json['store_ids'] != null) { if (json['store_ids'] != null) {
storeIds = new List<Null>(); storeIds = [];
} }
manufacturerIds = json['manufacturer_ids'].cast<int>(); manufacturerIds = json['manufacturer_ids'].cast<int>();
if (json['reviews'] != null) { if (json['reviews'] != null) {
reviews = new List<Null>(); reviews = [];
} }
if (json['images'] != null) { if (json['images'] != null) {
images = new List<Images>(); images = [];
json['images'].forEach((v) { json['images'].forEach((v) {
images.add(new Images.fromJson(v)); images!.add(new Images.fromJson(v));
}); });
} }
if (json['attributes'] != null) { if (json['attributes'] != null) {
attributes = new List<Null>(); attributes = [];
} }
if (json['specifications'] != null) { if (json['specifications'] != null) {
specifications = new List<Specifications>(); specifications = [];
json['specifications'].forEach((v) { json['specifications'].forEach((v) {
specifications.add(new Specifications.fromJson(v)); specifications!.add(new Specifications.fromJson(v));
}); });
} }
if (json['associated_product_ids'] != null) { if (json['associated_product_ids'] != null) {
associatedProductIds = new List<Null>(); associatedProductIds = [];
} }
if (json['tags'] != null) { if (json['tags'] != null) {
tags = new List<Null>(); tags = [];
} }
vendorId = json['vendor_id']; vendorId = json['vendor_id'];
seName = json['se_name']; seName = json['se_name'];
@ -378,8 +374,7 @@ class ScanQrModel {
data['name'] = this.name; data['name'] = this.name;
data['namen'] = this.namen; data['namen'] = this.namen;
if (this.localizedNames != null) { if (this.localizedNames != null) {
data['localized_names'] = data['localized_names'] = this.localizedNames!.map((v) => v.toJson()).toList();
this.localizedNames.map((v) => v.toJson()).toList();
} }
data['short_description'] = this.shortDescription; data['short_description'] = this.shortDescription;
data['short_descriptionn'] = this.shortDescriptionn; data['short_descriptionn'] = this.shortDescriptionn;
@ -404,8 +399,7 @@ class ScanQrModel {
data['gtin'] = this.gtin; data['gtin'] = this.gtin;
data['is_gift_card'] = this.isGiftCard; data['is_gift_card'] = this.isGiftCard;
data['require_other_products'] = this.requireOtherProducts; data['require_other_products'] = this.requireOtherProducts;
data['automatically_add_required_products'] = data['automatically_add_required_products'] = this.automaticallyAddRequiredProducts;
this.automaticallyAddRequiredProducts;
data['is_download'] = this.isDownload; data['is_download'] = this.isDownload;
data['unlimited_downloads'] = this.unlimitedDownloads; data['unlimited_downloads'] = this.unlimitedDownloads;
data['max_number_of_downloads'] = this.maxNumberOfDownloads; data['max_number_of_downloads'] = this.maxNumberOfDownloads;
@ -422,8 +416,7 @@ class ScanQrModel {
data['ship_separately'] = this.shipSeparately; data['ship_separately'] = this.shipSeparately;
data['additional_shipping_charge'] = this.additionalShippingCharge; data['additional_shipping_charge'] = this.additionalShippingCharge;
data['is_tax_exempt'] = this.isTaxExempt; data['is_tax_exempt'] = this.isTaxExempt;
data['is_telecommunications_or_broadcasting_or_electronic_services'] = data['is_telecommunications_or_broadcasting_or_electronic_services'] = this.isTelecommunicationsOrBroadcastingOrElectronicServices;
this.isTelecommunicationsOrBroadcastingOrElectronicServices;
data['use_multiple_warehouses'] = this.useMultipleWarehouses; data['use_multiple_warehouses'] = this.useMultipleWarehouses;
data['manage_inventory_method_id'] = this.manageInventoryMethodId; data['manage_inventory_method_id'] = this.manageInventoryMethodId;
data['stock_quantity'] = this.stockQuantity; data['stock_quantity'] = this.stockQuantity;
@ -433,25 +426,21 @@ class ScanQrModel {
data['display_stock_quantity'] = this.displayStockQuantity; data['display_stock_quantity'] = this.displayStockQuantity;
data['min_stock_quantity'] = this.minStockQuantity; data['min_stock_quantity'] = this.minStockQuantity;
data['notify_admin_for_quantity_below'] = this.notifyAdminForQuantityBelow; data['notify_admin_for_quantity_below'] = this.notifyAdminForQuantityBelow;
data['allow_back_in_stock_subscriptions'] = data['allow_back_in_stock_subscriptions'] = this.allowBackInStockSubscriptions;
this.allowBackInStockSubscriptions;
data['order_minimum_quantity'] = this.orderMinimumQuantity; data['order_minimum_quantity'] = this.orderMinimumQuantity;
data['order_maximum_quantity'] = this.orderMaximumQuantity; data['order_maximum_quantity'] = this.orderMaximumQuantity;
data['allowed_quantities'] = this.allowedQuantities; data['allowed_quantities'] = this.allowedQuantities;
data['allow_adding_only_existing_attribute_combinations'] = data['allow_adding_only_existing_attribute_combinations'] = this.allowAddingOnlyExistingAttributeCombinations;
this.allowAddingOnlyExistingAttributeCombinations;
data['disable_buy_button'] = this.disableBuyButton; data['disable_buy_button'] = this.disableBuyButton;
data['disable_wishlist_button'] = this.disableWishlistButton; data['disable_wishlist_button'] = this.disableWishlistButton;
data['available_for_pre_order'] = this.availableForPreOrder; data['available_for_pre_order'] = this.availableForPreOrder;
data['pre_order_availability_start_date_time_utc'] = data['pre_order_availability_start_date_time_utc'] = this.preOrderAvailabilityStartDateTimeUtc;
this.preOrderAvailabilityStartDateTimeUtc;
data['call_for_price'] = this.callForPrice; data['call_for_price'] = this.callForPrice;
data['price'] = this.price; data['price'] = this.price;
data['old_price'] = this.oldPrice; data['old_price'] = this.oldPrice;
data['product_cost'] = this.productCost; data['product_cost'] = this.productCost;
data['special_price'] = this.specialPrice; data['special_price'] = this.specialPrice;
data['special_price_start_date_time_utc'] = data['special_price_start_date_time_utc'] = this.specialPriceStartDateTimeUtc;
this.specialPriceStartDateTimeUtc;
data['special_price_end_date_time_utc'] = this.specialPriceEndDateTimeUtc; data['special_price_end_date_time_utc'] = this.specialPriceEndDateTimeUtc;
data['customer_enters_price'] = this.customerEntersPrice; data['customer_enters_price'] = this.customerEntersPrice;
data['minimum_customer_entered_price'] = this.minimumCustomerEnteredPrice; data['minimum_customer_entered_price'] = this.minimumCustomerEnteredPrice;
@ -485,12 +474,11 @@ class ScanQrModel {
data['manufacturer_ids'] = this.manufacturerIds; data['manufacturer_ids'] = this.manufacturerIds;
if (this.images != null) { if (this.images != null) {
data['images'] = this.images.map((v) => v.toJson()).toList(); data['images'] = this.images!.map((v) => v.toJson()).toList();
} }
if (this.specifications != null) { if (this.specifications != null) {
data['specifications'] = data['specifications'] = this.specifications!.map((v) => v.toJson()).toList();
this.specifications.map((v) => v.toJson()).toList();
} }
data['vendor_id'] = this.vendorId; data['vendor_id'] = this.vendorId;
@ -500,8 +488,8 @@ class ScanQrModel {
} }
class LocalizedNames { class LocalizedNames {
int languageId; int? languageId;
String localizedName; String? localizedName;
LocalizedNames({this.languageId, this.localizedName}); LocalizedNames({this.languageId, this.localizedName});
@ -519,11 +507,11 @@ class LocalizedNames {
} }
class Images { class Images {
int id; int? id;
int position; int? position;
String src; String? src;
String thumb; String? thumb;
String attachment; String? attachment;
Images({this.id, this.position, this.src, this.thumb, this.attachment}); Images({this.id, this.position, this.src, this.thumb, this.attachment});
@ -547,20 +535,14 @@ class Images {
} }
class Specifications { class Specifications {
int id; int? id;
int displayOrder; int? displayOrder;
String defaultValue; String? defaultValue;
String defaultValuen; String? defaultValuen;
String name; String? name;
String nameN; String? nameN;
Specifications( Specifications({this.id, this.displayOrder, this.defaultValue, this.defaultValuen, this.name, this.nameN});
{this.id,
this.displayOrder,
this.defaultValue,
this.defaultValuen,
this.name,
this.nameN});
Specifications.fromJson(Map<String, dynamic> json) { Specifications.fromJson(Map<String, dynamic> json) {
id = json['id']; id = json['id'];

@ -1,13 +1,13 @@
class SubCategoriesModel { class SubCategoriesModel {
String id; String? id;
String name; String? name;
String namen; String? namen;
List<LocalizedNames> localizedNames; List<LocalizedNames>? localizedNames;
String description; String? description;
int parentCategoryId; int? parentCategoryId;
int displayOrder; int? displayOrder;
dynamic image; dynamic image;
bool isLeaf; bool? isLeaf;
SubCategoriesModel( SubCategoriesModel(
{this.id, {this.id,
@ -25,9 +25,9 @@ class SubCategoriesModel {
name = json['name']; name = json['name'];
namen = json['namen']; namen = json['namen'];
if (json['localized_names'] != null) { if (json['localized_names'] != null) {
localizedNames = new List<LocalizedNames>(); localizedNames = [];
json['localized_names'].forEach((v) { json['localized_names'].forEach((v) {
localizedNames.add(new LocalizedNames.fromJson(v)); localizedNames!.add(new LocalizedNames.fromJson(v));
}); });
} }
description = json['description']; description = json['description'];
@ -44,7 +44,7 @@ class SubCategoriesModel {
data['namen'] = this.namen; data['namen'] = this.namen;
if (this.localizedNames != null) { if (this.localizedNames != null) {
data['localized_names'] = data['localized_names'] =
this.localizedNames.map((v) => v.toJson()).toList(); this.localizedNames!.map((v) => v.toJson()).toList();
} }
data['description'] = this.description; data['description'] = this.description;
data['parent_category_id'] = this.parentCategoryId; data['parent_category_id'] = this.parentCategoryId;
@ -56,8 +56,8 @@ class SubCategoriesModel {
} }
class LocalizedNames { class LocalizedNames {
int languageId; int? languageId;
String localizedName; String? localizedName;
LocalizedNames({this.languageId, this.localizedName}); LocalizedNames({this.languageId, this.localizedName});

@ -1,115 +1,115 @@
class SubProductsModel { class SubProductsModel {
String id; String? id;
bool visibleIndividually; bool? visibleIndividually;
String name; String? name;
String namen; String? namen;
List<LocalizedNames> localizedNames; List<LocalizedNames>? localizedNames;
String shortDescription; String? shortDescription;
String shortDescriptionn; String? shortDescriptionn;
String fullDescription; String? fullDescription;
String fullDescriptionn; String? fullDescriptionn;
bool markasNew; bool? markasNew;
bool showOnHomePage; bool? showOnHomePage;
dynamic metaKeywords; dynamic metaKeywords;
dynamic metaDescription; dynamic metaDescription;
dynamic metaTitle; dynamic metaTitle;
bool allowCustomerReviews; bool? allowCustomerReviews;
dynamic approvedRatingSum; dynamic approvedRatingSum;
dynamic notApprovedRatingSum; dynamic notApprovedRatingSum;
dynamic approvedTotalReviews; dynamic approvedTotalReviews;
dynamic notApprovedTotalReviews; dynamic notApprovedTotalReviews;
String sku; String? sku;
bool isRx; bool? isRx;
bool prescriptionRequired; bool? prescriptionRequired;
dynamic rxMessage; dynamic rxMessage;
dynamic rxMessagen; dynamic rxMessagen;
dynamic manufacturerPartNumber; dynamic manufacturerPartNumber;
dynamic gtin; dynamic gtin;
bool isGiftCard; bool? isGiftCard;
bool requireOtherProducts; bool? requireOtherProducts;
bool automaticallyAddRequiredProducts; bool? automaticallyAddRequiredProducts;
bool isDownload; bool? isDownload;
bool unlimitedDownloads; bool? unlimitedDownloads;
dynamic maxNumberOfDownloads; dynamic maxNumberOfDownloads;
dynamic downloadExpirationDays; dynamic downloadExpirationDays;
bool hasSampleDownload; bool? hasSampleDownload;
bool hasUserAgreement; bool? hasUserAgreement;
bool isRecurring; bool? isRecurring;
dynamic recurringCycleLength; dynamic recurringCycleLength;
dynamic recurringTotalCycles; dynamic recurringTotalCycles;
bool isRental; bool? isRental;
dynamic rentalPriceLength; dynamic rentalPriceLength;
bool isShipEnabled; bool? isShipEnabled;
bool isFreeShipping; bool? isFreeShipping;
bool shipSeparately; bool? shipSeparately;
dynamic additionalShippingCharge; dynamic additionalShippingCharge;
bool isTaxExempt; bool? isTaxExempt;
bool isTelecommunicationsOrBroadcastingOrElectronicServices; bool? isTelecommunicationsOrBroadcastingOrElectronicServices;
bool useMultipleWarehouses; bool? useMultipleWarehouses;
dynamic manageInventoryMethodId; dynamic manageInventoryMethodId;
dynamic stockQuantity; dynamic stockQuantity;
String stockAvailability; String? stockAvailability;
String stockAvailabilityn; String? stockAvailabilityn;
bool displayStockAvailability; bool? displayStockAvailability;
bool displayStockQuantity; bool? displayStockQuantity;
dynamic minStockQuantity; dynamic minStockQuantity;
dynamic notifyAdminForQuantityBelow; dynamic notifyAdminForQuantityBelow;
bool allowBackInStockSubscriptions; bool? allowBackInStockSubscriptions;
dynamic orderMinimumQuantity; dynamic orderMinimumQuantity;
dynamic orderMaximumQuantity; dynamic orderMaximumQuantity;
dynamic allowedQuantities; dynamic allowedQuantities;
bool allowAddingOnlyExistingAttributeCombinations; bool? allowAddingOnlyExistingAttributeCombinations;
bool disableBuyButton; bool? disableBuyButton;
bool disableWishlistButton; bool? disableWishlistButton;
bool availableForPreOrder; bool? availableForPreOrder;
dynamic preOrderAvailabilityStartDateTimeUtc; dynamic preOrderAvailabilityStartDateTimeUtc;
bool callForPrice; bool? callForPrice;
dynamic price; dynamic price;
dynamic oldPrice; dynamic oldPrice;
dynamic productCost; dynamic productCost;
dynamic specialPrice; dynamic specialPrice;
dynamic specialPriceStartDateTimeUtc; dynamic specialPriceStartDateTimeUtc;
dynamic specialPriceEndDateTimeUtc; dynamic specialPriceEndDateTimeUtc;
bool customerEntersPrice; bool? customerEntersPrice;
dynamic minimumCustomerEnteredPrice; dynamic minimumCustomerEnteredPrice;
dynamic maximumCustomerEnteredPrice; dynamic maximumCustomerEnteredPrice;
bool basepriceEnabled; bool? basepriceEnabled;
dynamic basepriceAmount; dynamic basepriceAmount;
dynamic basepriceBaseAmount; dynamic basepriceBaseAmount;
bool hasTierPrices; bool? hasTierPrices;
bool hasDiscountsApplied; bool? hasDiscountsApplied;
dynamic discountName; dynamic discountName;
dynamic discountNamen; dynamic discountNamen;
dynamic discountDescription; dynamic discountDescription;
dynamic discountDescriptionn; dynamic discountDescriptionn;
dynamic discountPercentage; dynamic discountPercentage;
String currency; String? currency;
String currencyn; String? currencyn;
double weight; double? weight;
dynamic length; dynamic length;
dynamic width; dynamic width;
dynamic height; dynamic height;
dynamic availableStartDateTimeUtc; dynamic availableStartDateTimeUtc;
dynamic availableEndDateTimeUtc; dynamic availableEndDateTimeUtc;
dynamic displayOrder; dynamic displayOrder;
bool published; bool? published;
bool deleted; bool? deleted;
String createdOnUtc; String? createdOnUtc;
String updatedOnUtc; String? updatedOnUtc;
String productType; String? productType;
dynamic parentGroupedProductId; dynamic parentGroupedProductId;
List<dynamic> roleIds; List<dynamic>? roleIds;
List<dynamic> discountIds; List<dynamic>? discountIds;
List<dynamic> storeIds; List<dynamic>? storeIds;
List<int> manufacturerIds; List<int>? manufacturerIds;
List<dynamic> reviews; List<dynamic>? reviews;
List<Images> images; List<Images>? images;
List<dynamic> attributes; List<dynamic>? attributes;
List<Specifications> specifications; List<Specifications>? specifications;
List<dynamic> associatedProductIds; List<dynamic>? associatedProductIds;
List<dynamic> tags; List<dynamic>? tags;
dynamic vendorId; dynamic vendorId;
String seName; String? seName;
SubProductsModel( SubProductsModel(
{this.id, {this.id,
@ -229,16 +229,16 @@ class SubProductsModel {
visibleIndividually = json['visible_individually']; visibleIndividually = json['visible_individually'];
name = json['name']; name = json['name'];
if (json['images'] != null) { if (json['images'] != null) {
images = new List<Images>(); images = [];
json['images'].forEach((v) { json['images'].forEach((v) {
images.add(new Images.fromJson(v)); images!.add(new Images.fromJson(v));
}); });
} }
namen = json['namen']; namen = json['namen'];
if (json['localized_names'] != null) { if (json['localized_names'] != null) {
localizedNames = new List<LocalizedNames>(); localizedNames = [];
json['localized_names'].forEach((v) { json['localized_names'].forEach((v) {
localizedNames.add(new LocalizedNames.fromJson(v)); localizedNames!.add(new LocalizedNames.fromJson(v));
}); });
} }
shortDescription = json['short_description']; shortDescription = json['short_description'];
@ -343,9 +343,9 @@ class SubProductsModel {
manufacturerIds = json['manufacturer_ids'].cast<int>(); manufacturerIds = json['manufacturer_ids'].cast<int>();
if (json['specifications'] != null) { if (json['specifications'] != null) {
specifications = new List<Specifications>(); specifications = [];
json['specifications'].forEach((v) { json['specifications'].forEach((v) {
specifications.add(new Specifications.fromJson(v)); specifications!.add(new Specifications.fromJson(v));
}); });
} }
@ -361,7 +361,7 @@ class SubProductsModel {
data['namen'] = this.namen; data['namen'] = this.namen;
if (this.localizedNames != null) { if (this.localizedNames != null) {
data['localized_names'] = data['localized_names'] =
this.localizedNames.map((v) => v.toJson()).toList(); this.localizedNames!.map((v) => v.toJson()).toList();
} }
data['short_description'] = this.shortDescription; data['short_description'] = this.shortDescription;
data['short_descriptionn'] = this.shortDescriptionn; data['short_descriptionn'] = this.shortDescriptionn;
@ -468,7 +468,7 @@ class SubProductsModel {
if (this.specifications != null) { if (this.specifications != null) {
data['specifications'] = data['specifications'] =
this.specifications.map((v) => v.toJson()).toList(); this.specifications!.map((v) => v.toJson()).toList();
} }
data['vendor_id'] = this.vendorId; data['vendor_id'] = this.vendorId;
@ -478,8 +478,8 @@ class SubProductsModel {
} }
class LocalizedNames { class LocalizedNames {
int languageId; int? languageId;
String localizedName; String? localizedName;
LocalizedNames({this.languageId, this.localizedName}); LocalizedNames({this.languageId, this.localizedName});
@ -497,11 +497,11 @@ class LocalizedNames {
} }
class Images { class Images {
int id; int? id;
int position; int? position;
String src; String? src;
String thumb; String? thumb;
String attachment; String? attachment;
Images({this.id, this.position, this.src, this.thumb, this.attachment}); Images({this.id, this.position, this.src, this.thumb, this.attachment});
@ -525,12 +525,12 @@ class Images {
} }
class Specifications { class Specifications {
int id; int? id;
int displayOrder; int? displayOrder;
String defaultValue; String? defaultValue;
String defaultValuen; String? defaultValuen;
String name; String? name;
String nameN; String? nameN;
Specifications( Specifications(
{this.id, {this.id,

@ -1,40 +1,40 @@
import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
class Prescriptions { class Prescriptions {
String setupID; String? setupID;
int projectID; int? projectID;
int patientID; int? patientID;
int appointmentNo; int? appointmentNo;
String appointmentDate; String? appointmentDate;
String doctorName; String? doctorName;
String clinicDescription; String? clinicDescription;
String name; String? name;
int episodeID; int? episodeID;
int actualDoctorRate; int? actualDoctorRate;
int admission; int? admission;
int clinicID; int? clinicID;
String companyName; String? companyName;
String despensedStatus; String? despensedStatus;
DateTime dischargeDate; DateTime? dischargeDate;
int dischargeNo; int? dischargeNo;
int doctorID; int? doctorID;
String doctorImageURL; String? doctorImageURL;
int doctorRate; int? doctorRate;
String doctorTitle; String? doctorTitle;
int gender; int? gender;
String genderDescription; String? genderDescription;
bool isActiveDoctorProfile; bool? isActiveDoctorProfile;
bool isDoctorAllowVedioCall; bool? isDoctorAllowVedioCall;
bool isExecludeDoctor; bool? isExecludeDoctor;
bool isInOutPatient; bool? isInOutPatient;
bool isLiveCareAppointment; bool? isLiveCareAppointment;
String isInOutPatientDescription; String? isInOutPatientDescription;
String isInOutPatientDescriptionN; String? isInOutPatientDescriptionN;
bool isInsurancePatient; bool? isInsurancePatient;
String nationalityFlagURL; String? nationalityFlagURL;
int noOfPatientsRate; int? noOfPatientsRate;
String qR; String? qR;
List<String> speciality; List<String>? speciality;
Prescriptions( Prescriptions(
{this.setupID, {this.setupID,
@ -149,10 +149,10 @@ class Prescriptions {
} }
class PrescriptionsList { class PrescriptionsList {
String filterName = ""; String? filterName = "";
List<Prescriptions> prescriptionsList = List(); List<Prescriptions>? prescriptionsList = [];
PrescriptionsList({this.filterName, Prescriptions prescriptions}) { PrescriptionsList({this.filterName, Prescriptions? prescriptions}) {
prescriptionsList.add(prescriptions); prescriptionsList!.add(prescriptions!);
} }
} }

@ -1,27 +1,27 @@
class PharmacyPrescriptions { class PharmacyPrescriptions {
String expiryDate; String? expiryDate;
dynamic sellingPrice; dynamic sellingPrice;
int quantity; int? quantity;
int itemID; int? itemID;
int locationID; int? locationID;
int projectID; int? projectID;
String setupID; String? setupID;
String locationDescription; String? locationDescription;
dynamic locationDescriptionN; dynamic locationDescriptionN;
String itemDescription; String? itemDescription;
Null itemDescriptionN; Null itemDescriptionN;
String alias; String? alias;
int locationTypeID; int? locationTypeID;
int barcode; int? barcode;
Null companybarcode; Null companybarcode;
int cityID; int? cityID;
String cityName; String? cityName;
dynamic distanceInKilometers; dynamic distanceInKilometers;
String latitude; String? latitude;
int locationType; int? locationType;
String longitude; String? longitude;
String phoneNumber; String? phoneNumber;
String projectImageURL; String? projectImageURL;
Null sortOrder; Null sortOrder;
PharmacyPrescriptions( PharmacyPrescriptions(

@ -1,13 +1,13 @@
class PrescriptionInfoRCModel { class PrescriptionInfoRCModel {
String itemDescription; String? itemDescription;
String image; String? image;
String sKU; String? sKU;
dynamic productId; dynamic productId;
dynamic productName; dynamic productName;
int quantity; int? quantity;
int orderId; int? orderId;
int totalPrice; int? totalPrice;
int dispenseQuantity; int? dispenseQuantity;
dynamic itemhand; dynamic itemhand;
PrescriptionInfoRCModel( PrescriptionInfoRCModel(

@ -1,50 +1,50 @@
class PrescriptionReport { class PrescriptionReport {
String address; String? address;
int appointmentNo; int? appointmentNo;
String clinic; String? clinic;
String companyName; String? companyName;
int days; int? days;
String doctorName; String? doctorName;
num doseDailyQuantity; num? doseDailyQuantity;
String frequency; String? frequency;
int frequencyNumber; int? frequencyNumber;
String image; String? image;
String imageExtension; String? imageExtension;
String imageSRCUrl; String? imageSRCUrl;
String imageString; String? imageString;
String imageThumbUrl; String? imageThumbUrl;
String isCovered; String? isCovered;
String itemDescription; String? itemDescription;
int itemID; int? itemID;
String orderDate; String? orderDate;
int patientID; int? patientID;
String patientName; String? patientName;
String phoneOffice1; String? phoneOffice1;
String prescriptionQR; String? prescriptionQR;
num prescriptionTimes; num? prescriptionTimes;
String productImage; String? productImage;
String productImageBase64; String? productImageBase64;
String productImageString; String? productImageString;
int projectID; int? projectID;
String projectName; String? projectName;
String remarks; String? remarks;
String route; String? route;
String sKU; String? sKU;
int scaleOffset; int? scaleOffset;
String startDate; String? startDate;
String patientAge; String? patientAge;
String patientGender; String? patientGender;
String phoneOffice; String? phoneOffice;
int doseTimingID; int? doseTimingID;
int frequencyID; int? frequencyID;
int routeID; int? routeID;
String name; String? name;
String itemDescriptionN; String? itemDescriptionN;
String routeN; String? routeN;
String frequencyN; String? frequencyN;
PrescriptionReport({ PrescriptionReport({
this.address, this.address,

@ -1,38 +1,38 @@
class PrescriptionReportEnh { class PrescriptionReportEnh {
String address; String? address;
int appointmentNo; int? appointmentNo;
String clinic; String? clinic;
Null companyName; Null companyName;
int days; int? days;
String doctorName; String? doctorName;
num doseDailyQuantity; num? doseDailyQuantity;
String frequency; String? frequency;
int frequencyNumber; int? frequencyNumber;
Null image; Null image;
Null imageExtension; Null imageExtension;
String imageSRCUrl; String? imageSRCUrl;
Null imageString; Null imageString;
String imageThumbUrl; String? imageThumbUrl;
String isCovered; String? isCovered;
String itemDescription; String? itemDescription;
String itemDescriptionN; String? itemDescriptionN;
int itemID; int? itemID;
String orderDate; String? orderDate;
int patientID; int? patientID;
String patientName; String? patientName;
String phoneOffice1; String? phoneOffice1;
Null prescriptionQR; Null prescriptionQR;
num prescriptionTimes; num? prescriptionTimes;
Null productImage; Null productImage;
Null productImageBase64; Null productImageBase64;
String productImageString; String? productImageString;
int projectID; int? projectID;
String projectName; String? projectName;
String remarks; String? remarks;
String route; String? route;
String sKU; String? sKU;
int scaleOffset; int? scaleOffset;
String startDate; String? startDate;
PrescriptionReportEnh( PrescriptionReportEnh(
{this.address, {this.address,

@ -1,32 +1,32 @@
class PrescriptionReportINP { class PrescriptionReportINP {
int patientID; int? patientID;
String patientName; String? patientName;
String patientAge; String? patientAge;
String patientGender; String? patientGender;
String address; String? address;
String phoneOffice; String? phoneOffice;
String itemDescription; String? itemDescription;
int doseTimingID; int? doseTimingID;
int frequencyID; int? frequencyID;
int routeID; int? routeID;
String clinic; String? clinic;
String doctorName; String? doctorName;
String route; String? route;
String frequency; String? frequency;
String remarks; String? remarks;
String name; String? name;
int days; int? days;
String startDate; String? startDate;
String orderDate; String? orderDate;
int doseDailyQuantity; int? doseDailyQuantity;
int itemID; int? itemID;
Null productImage; Null productImage;
String sKU; String? sKU;
String itemDescriptionN; String? itemDescriptionN;
String routeN; String? routeN;
String frequencyN; String? frequencyN;
String imageSRCUrl; String? imageSRCUrl;
String imageThumbUrl; String? imageThumbUrl;
PrescriptionReportINP( PrescriptionReportINP(
{this.patientID, {this.patientID,

@ -3,32 +3,32 @@ import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
class PrescriptionsOrder { class PrescriptionsOrder {
int iD; int? iD;
dynamic patientID; dynamic patientID;
bool patientOutSA; bool? patientOutSA;
bool isOutPatient; bool? isOutPatient;
int projectID; int? projectID;
int nearestProjectID; int? nearestProjectID;
double longitude; double? longitude;
double latitude; double? latitude;
dynamic appointmentNo; dynamic appointmentNo;
dynamic dischargeID; dynamic dischargeID;
int lineItemNo; int? lineItemNo;
int status; int? status;
dynamic description; dynamic description;
dynamic descriptionN; dynamic descriptionN;
DateTime createdOn; DateTime? createdOn;
int serviceID; int? serviceID;
int createdBy; int? createdBy;
DateTime editedOn; DateTime? editedOn;
int editedBy; int? editedBy;
int channel; int? channel;
dynamic clientRequestID; dynamic clientRequestID;
bool returnedToQueue; bool? returnedToQueue;
dynamic pickupDateTime; dynamic pickupDateTime;
dynamic pickupLocationName; dynamic pickupLocationName;
dynamic dropoffLocationName; dynamic dropoffLocationName;
int realRRTHaveTransactions; int? realRRTHaveTransactions;
dynamic nearestProjectDescription; dynamic nearestProjectDescription;
dynamic nearestProjectDescriptionN; dynamic nearestProjectDescriptionN;
dynamic projectDescription; dynamic projectDescription;
@ -45,7 +45,7 @@ class PrescriptionsOrder {
return '$status'; return '$status';
} }
String getFormattedDateTime()=> DateUtil.getWeekDayMonthDayYearDateFormatted(createdOn, isAppArabic ? 'ar' : 'en'); String getFormattedDateTime()=> DateUtil.getWeekDayMonthDayYearDateFormatted(createdOn!, isAppArabic ? 'ar' : 'en');
PrescriptionsOrder( PrescriptionsOrder(
{this.iD, {this.iD,

@ -1,16 +1,16 @@
class RequestGetListPharmacyForPrescriptions { class RequestGetListPharmacyForPrescriptions {
dynamic latitude; dynamic latitude;
dynamic longitude; dynamic longitude;
double versionID; double? versionID;
int channel; int? channel;
int languageID; int? languageID;
String iPAdress; String? iPAdress;
String generalid; String? generalid;
int patientOutSA; int? patientOutSA;
String sessionID; String? sessionID;
bool isDentalAllowedBackend; bool? isDentalAllowedBackend;
int deviceTypeID; int? deviceTypeID;
int itemID; int? itemID;
RequestGetListPharmacyForPrescriptions( RequestGetListPharmacyForPrescriptions(
{this.latitude, {this.latitude,

@ -1,44 +1,44 @@
class RequestPrescriptionReport { class RequestPrescriptionReport {
double versionID; double? versionID;
int channel; int? channel;
int languageID; int? languageID;
String iPAdress; String? iPAdress;
String generalid; String? generalid;
int patientOutSA; int? patientOutSA;
String sessionID; String? sessionID;
bool isDentalAllowedBackend; bool? isDentalAllowedBackend;
int deviceTypeID; int? deviceTypeID;
int patientID; int? patientID;
String tokenID; String? tokenID;
int patientTypeID; int? patientTypeID;
int patientType; int? patientType;
int appointmentNo; int? appointmentNo;
String setupID; String? setupID;
int episodeID; int? episodeID;
int clinicID; int? clinicID;
int projectID; int? projectID;
int dischargeNo; int? dischargeNo;
RequestPrescriptionReport( RequestPrescriptionReport(
{this.versionID, {this.versionID,
this.channel, this.channel,
this.languageID, this.languageID,
this.iPAdress, this.iPAdress,
this.generalid, this.generalid,
this.patientOutSA, this.patientOutSA,
this.sessionID, this.sessionID,
this.isDentalAllowedBackend, this.isDentalAllowedBackend,
this.deviceTypeID, this.deviceTypeID,
this.patientID, this.patientID,
this.tokenID, this.tokenID,
this.patientTypeID, this.patientTypeID,
this.patientType, this.patientType,
this.appointmentNo, this.appointmentNo,
this.setupID, this.setupID,
this.episodeID, this.episodeID,
this.clinicID, this.clinicID,
this.projectID, this.projectID,
this.dischargeNo}); this.dischargeNo});
RequestPrescriptionReport.fromJson(Map<String, dynamic> json) { RequestPrescriptionReport.fromJson(Map<String, dynamic> json) {
versionID = json['VersionID']; versionID = json['VersionID'];

@ -1,23 +1,23 @@
class RequestPrescriptionReportEnh { class RequestPrescriptionReportEnh {
double versionID; double? versionID;
int channel; int? channel;
int languageID; int? languageID;
String iPAdress; String? iPAdress;
String generalid; String? generalid;
int patientOutSA; int? patientOutSA;
String sessionID; String? sessionID;
bool isDentalAllowedBackend; bool? isDentalAllowedBackend;
int deviceTypeID; int? deviceTypeID;
int patientID; int? patientID;
String tokenID; String? tokenID;
int patientTypeID; int? patientTypeID;
int patientType; int? patientType;
int appointmentNo; int? appointmentNo;
String setupID; String? setupID;
int dischargeNo; int? dischargeNo;
int episodeID; int? episodeID;
int clinicID; int? clinicID;
int projectID; int? projectID;
RequestPrescriptionReportEnh( RequestPrescriptionReportEnh(
{this.versionID, {this.versionID,

@ -1,17 +1,17 @@
class RequestPrescriptions { class RequestPrescriptions {
double versionID; double? versionID;
int channel; int? channel;
int languageID; int? languageID;
String iPAdress; String? iPAdress;
String generalid; String? generalid;
int patientOutSA; int? patientOutSA;
String sessionID; String? sessionID;
bool isDentalAllowedBackend; bool? isDentalAllowedBackend;
int deviceTypeID; int? deviceTypeID;
int patientID; int? patientID;
String tokenID; String? tokenID;
int patientTypeID; int? patientTypeID;
int patientType; int? patientType;
RequestPrescriptions( RequestPrescriptions(
{this.versionID, {this.versionID,

@ -1,14 +1,14 @@
class RequestPrescriptionsOrders { class RequestPrescriptionsOrders {
int patientID; int? patientID;
int patientOutSA; int? patientOutSA;
double versionID; double? versionID;
int channel; int? channel;
int languageID; int? languageID;
String iPAdress; String? iPAdress;
String generalid; String? generalid;
String sessionID; String? sessionID;
bool isDentalAllowedBackend; bool? isDentalAllowedBackend;
int deviceTypeID; int? deviceTypeID;
RequestPrescriptionsOrders( RequestPrescriptionsOrders(
{this.patientID, {this.patientID,

@ -1,31 +1,31 @@
import 'package:diplomaticquarterapp/core/model/prescriptions/prescription_report.dart'; import 'package:diplomaticquarterapp/core/model/prescriptions/prescription_report.dart';
class RequestSendPrescriptionEmail { class RequestSendPrescriptionEmail {
String appointmentDate; String? appointmentDate;
double versionID; double? versionID;
int channel; int? channel;
int languageID; int? languageID;
String iPAdress; String? iPAdress;
String generalid; String? generalid;
int patientOutSA; int? patientOutSA;
String sessionID; String? sessionID;
bool isDentalAllowedBackend; bool? isDentalAllowedBackend;
int deviceTypeID; int? deviceTypeID;
int patientID; int? patientID;
String tokenID; String? tokenID;
int patientTypeID; int? patientTypeID;
int patientType; int? patientType;
String to; String? to;
String dateofBirth; String? dateofBirth;
String patientIditificationNum; String? patientIditificationNum;
String patientMobileNumber; String? patientMobileNumber;
String patientName; String? patientName;
String setupID; String? setupID;
String clinicName; String? clinicName;
String doctorName; String? doctorName;
int doctorID; int? doctorID;
int projectID; int? projectID;
List<PrescriptionReport> listPrescriptions; List<PrescriptionReport>? listPrescriptions;
RequestSendPrescriptionEmail( RequestSendPrescriptionEmail(
{this.appointmentDate, {this.appointmentDate,
@ -103,8 +103,7 @@ class RequestSendPrescriptionEmail {
data['PatientName'] = this.patientName; data['PatientName'] = this.patientName;
data['SetupID'] = this.setupID; data['SetupID'] = this.setupID;
if (this.listPrescriptions != null) { if (this.listPrescriptions != null) {
data['ListPrescriptions'] = data['ListPrescriptions'] = this.listPrescriptions!.map((v) => v.toJson()).toList();
this.listPrescriptions.map((v) => v.toJson()).toList();
} }
data['ClinicName'] = this.clinicName; data['ClinicName'] = this.clinicName;
data['DoctorName'] = this.doctorName; data['DoctorName'] = this.doctorName;

@ -1,7 +1,7 @@
class PrivilegeModel { class PrivilegeModel {
int iD; int? iD;
String serviceName; String? serviceName;
bool privilege; bool? privilege;
dynamic region; dynamic region;
PrivilegeModel({this.iD, this.serviceName, this.privilege, this.region}); PrivilegeModel({this.iD, this.serviceName, this.privilege, this.region});

@ -1,5 +1,5 @@
class VidaPlusProjectListModel { class VidaPlusProjectListModel {
int projectID; int? projectID;
VidaPlusProjectListModel({this.projectID}); VidaPlusProjectListModel({this.projectID});

@ -1,86 +1,86 @@
class QRParkingModel { class QRParkingModel {
Null totalRecords; Null totalRecords;
Null nRowID; Null nRowID;
int qRParkingID; int? qRParkingID;
String description; String? description;
String descriptionN; String? descriptionN;
Null qRCompare; Null qRCompare;
Null qRValue; Null qRValue;
String imagePath; String? imagePath;
bool isActive; bool? isActive;
int parkingID; int? parkingID;
int branchID; int? branchID;
int companyID; int? companyID;
int buildingID; int? buildingID;
int rowID; int? rowID;
int gateID; int? gateID;
int floorID; int? floorID;
Null imagePath1; Null imagePath1;
int createdBy; int? createdBy;
String createdOn; String? createdOn;
Null editedBy; Null editedBy;
Null editedOn; Null editedOn;
String parkingDescription; String? parkingDescription;
String parkingDescriptionN; String? parkingDescriptionN;
String gateDescription; String? gateDescription;
String gateDescriptionN; String? gateDescriptionN;
String branchDescription; String? branchDescription;
String branchDescriptionN; String? branchDescriptionN;
String companyDescription; String? companyDescription;
String companyDescriptionN; String? companyDescriptionN;
String rowDescription; String? rowDescription;
String rowDescriptionN; String? rowDescriptionN;
String floorDescription; String? floorDescription;
String floorDescriptionN; String? floorDescriptionN;
String buildingDescription; String? buildingDescription;
String buildingDescriptionN; String? buildingDescriptionN;
String qRParkingCode; String? qRParkingCode;
String parkingCode; String? parkingCode;
double latitude; double? latitude;
double longitude; double? longitude;
String qRImageStr; String? qRImageStr;
QRParkingModel( QRParkingModel(
{this.totalRecords, {this.totalRecords,
this.nRowID, this.nRowID,
this.qRParkingID, this.qRParkingID,
this.description, this.description,
this.descriptionN, this.descriptionN,
this.qRCompare, this.qRCompare,
this.qRValue, this.qRValue,
this.imagePath, this.imagePath,
this.isActive, this.isActive,
this.parkingID, this.parkingID,
this.branchID, this.branchID,
this.companyID, this.companyID,
this.buildingID, this.buildingID,
this.rowID, this.rowID,
this.gateID, this.gateID,
this.floorID, this.floorID,
this.imagePath1, this.imagePath1,
this.createdBy, this.createdBy,
this.createdOn, this.createdOn,
this.editedBy, this.editedBy,
this.editedOn, this.editedOn,
this.parkingDescription, this.parkingDescription,
this.parkingDescriptionN, this.parkingDescriptionN,
this.gateDescription, this.gateDescription,
this.gateDescriptionN, this.gateDescriptionN,
this.branchDescription, this.branchDescription,
this.branchDescriptionN, this.branchDescriptionN,
this.companyDescription, this.companyDescription,
this.companyDescriptionN, this.companyDescriptionN,
this.rowDescription, this.rowDescription,
this.rowDescriptionN, this.rowDescriptionN,
this.floorDescription, this.floorDescription,
this.floorDescriptionN, this.floorDescriptionN,
this.buildingDescription, this.buildingDescription,
this.buildingDescriptionN, this.buildingDescriptionN,
this.qRParkingCode, this.qRParkingCode,
this.parkingCode, this.parkingCode,
this.latitude, this.latitude,
this.longitude, this.longitude,
this.qRImageStr}); this.qRImageStr});
QRParkingModel.fromJson(Map<String, dynamic> json) { QRParkingModel.fromJson(Map<String, dynamic> json) {
totalRecords = json['TotalRecords']; totalRecords = json['TotalRecords'];

@ -1,48 +1,48 @@
import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
class FinalRadiology { class FinalRadiology {
String setupID; String? setupID;
int projectID; int? projectID;
dynamic patientID; dynamic patientID;
int invoiceLineItemNo; int? invoiceLineItemNo;
int invoiceNo; int? invoiceNo;
dynamic invoiceNo_VP; dynamic invoiceNo_VP;
int doctorID; int? doctorID;
int clinicID; int? clinicID;
DateTime orderDate; DateTime? orderDate;
String reportData; String? reportData;
String imageURL; String? imageURL;
String procedureID; String? procedureID;
int appointmentNo; int? appointmentNo;
Null dIAPacsURL; Null dIAPacsURL;
bool isRead; bool? isRead;
String readOn; String? readOn;
var admissionNo; var admissionNo;
bool isInOutPatient; bool? isInOutPatient;
int actualDoctorRate; int? actualDoctorRate;
String clinicDescription; String? clinicDescription;
String dIAPACSURL; String? dIAPACSURL;
String doctorImageURL; String? doctorImageURL;
String doctorName; String? doctorName;
int doctorRate; int? doctorRate;
String doctorTitle; String? doctorTitle;
int gender; int? gender;
String genderDescription; String? genderDescription;
bool isActiveDoctorProfile; bool? isActiveDoctorProfile;
bool isExecludeDoctor; bool? isExecludeDoctor;
String isInOutPatientDescription; String? isInOutPatientDescription;
String isInOutPatientDescriptionN; String? isInOutPatientDescriptionN;
String nationalityFlagURL; String? nationalityFlagURL;
int noOfPatientsRate; int? noOfPatientsRate;
int orderNo; int? orderNo;
String projectName; String? projectName;
String qR; String? qR;
String reportDataHTML; String? reportDataHTML;
String reportDataTextString; String? reportDataTextString;
List<String> speciality; List<String>? speciality;
bool isCVI; bool? isCVI;
bool isRadMedicalReport; bool? isRadMedicalReport;
bool isLiveCareAppointment; bool? isLiveCareAppointment;
FinalRadiology( FinalRadiology(
{this.setupID, {this.setupID,
@ -50,7 +50,7 @@ class FinalRadiology {
this.patientID, this.patientID,
this.invoiceLineItemNo, this.invoiceLineItemNo,
this.invoiceNo, this.invoiceNo,
this.invoiceNo_VP, this.invoiceNo_VP,
this.doctorID, this.doctorID,
this.clinicID, this.clinicID,
this.orderDate, this.orderDate,
@ -85,7 +85,8 @@ class FinalRadiology {
this.reportDataTextString, this.reportDataTextString,
this.speciality, this.speciality,
this.isCVI, this.isCVI,
this.isRadMedicalReport,this.isLiveCareAppointment}); this.isRadMedicalReport,
this.isLiveCareAppointment});
FinalRadiology.fromJson(Map<String, dynamic> json) { FinalRadiology.fromJson(Map<String, dynamic> json) {
try { try {
@ -128,10 +129,9 @@ class FinalRadiology {
isLiveCareAppointment = json['IsLiveCareAppointment']; isLiveCareAppointment = json['IsLiveCareAppointment'];
reportDataHTML = json['ReportDataHTML']; reportDataHTML = json['ReportDataHTML'];
reportDataTextString = json['ReportDataTextString']; reportDataTextString = json['ReportDataTextString'];
// speciality = json['Speciality'].cast<String>(); // speciality = json['Speciality'].cast<String>();
isCVI = json['isCVI']; isCVI = json['isCVI'];
isRadMedicalReport = json['isRadMedicalReport']; isRadMedicalReport = json['isRadMedicalReport'];
} catch (e) { } catch (e) {
print(e); print(e);
} }
@ -185,11 +185,11 @@ class FinalRadiology {
} }
class FinalRadiologyList { class FinalRadiologyList {
String filterName = ""; String? filterName = "";
List<FinalRadiology> finalRadiologyList = List(); List<FinalRadiology>? finalRadiologyList = [];
FinalRadiologyList({this.filterName, this.finalRadiologyList}); FinalRadiologyList({this.filterName, this.finalRadiologyList});
// { // {
// finalRadiologyList.add(finalRadiology); // finalRadiologyList.add(finalRadiology);
// } // }
} }

@ -1,46 +1,46 @@
class RequestPatientRadOrdersDetails { class RequestPatientRadOrdersDetails {
int projectID; int? projectID;
int orderNo; int? orderNo;
int invoiceNo; int? invoiceNo;
String setupID; String? setupID;
String procedureID; String? procedureID;
bool isMedicalReport; bool? isMedicalReport;
bool isCVI; bool? isCVI;
double versionID; double? versionID;
int channel; int? channel;
int languageID; int? languageID;
String iPAdress; String? iPAdress;
String generalid; String? generalid;
int patientOutSA; int? patientOutSA;
String sessionID; String? sessionID;
bool isDentalAllowedBackend; bool? isDentalAllowedBackend;
int deviceTypeID; int? deviceTypeID;
int patientID; int? patientID;
String tokenID; String? tokenID;
int patientTypeID; int? patientTypeID;
int patientType; int? patientType;
RequestPatientRadOrdersDetails( RequestPatientRadOrdersDetails(
{this.projectID, {this.projectID,
this.orderNo, this.orderNo,
this.invoiceNo, this.invoiceNo,
this.setupID, this.setupID,
this.procedureID, this.procedureID,
this.isMedicalReport, this.isMedicalReport,
this.isCVI, this.isCVI,
this.versionID, this.versionID,
this.channel, this.channel,
this.languageID, this.languageID,
this.iPAdress, this.iPAdress,
this.generalid, this.generalid,
this.patientOutSA, this.patientOutSA,
this.sessionID, this.sessionID,
this.isDentalAllowedBackend, this.isDentalAllowedBackend,
this.deviceTypeID, this.deviceTypeID,
this.patientID, this.patientID,
this.tokenID, this.tokenID,
this.patientTypeID, this.patientTypeID,
this.patientType}); this.patientType});
RequestPatientRadOrdersDetails.fromJson(Map<String, dynamic> json) { RequestPatientRadOrdersDetails.fromJson(Map<String, dynamic> json) {
projectID = json['ProjectID']; projectID = json['ProjectID'];

@ -1,61 +1,61 @@
class RequestSendRadReportEmail { class RequestSendRadReportEmail {
int channel; int? channel;
String clinicName; String? clinicName;
String dateofBirth; String? dateofBirth;
int deviceTypeID; int? deviceTypeID;
String doctorName; String? doctorName;
String generalid; String? generalid;
int invoiceNo; int? invoiceNo;
int invoiceNo_VP; int? invoiceNo_VP;
String iPAdress; String? iPAdress;
bool isDentalAllowedBackend; bool? isDentalAllowedBackend;
int languageID; int? languageID;
String orderDate; String? orderDate;
int patientID; int? patientID;
String patientIditificationNum; String? patientIditificationNum;
String patientMobileNumber; String? patientMobileNumber;
String patientName; String? patientName;
int patientOutSA; int? patientOutSA;
int patientType; int? patientType;
int patientTypeID; int? patientTypeID;
int projectID; int? projectID;
String projectName; String? projectName;
String radResult; String? radResult;
String sessionID; String? sessionID;
String setupID; String? setupID;
String to; String? to;
String tokenID; String? tokenID;
double versionID; double? versionID;
int invoiceLineItemNo; int? invoiceLineItemNo;
RequestSendRadReportEmail( RequestSendRadReportEmail(
{this.channel, {this.channel,
this.clinicName, this.clinicName,
this.dateofBirth, this.dateofBirth,
this.deviceTypeID, this.deviceTypeID,
this.doctorName, this.doctorName,
this.generalid, this.generalid,
this.invoiceNo, this.invoiceNo,
this.invoiceNo_VP, this.invoiceNo_VP,
this.iPAdress, this.iPAdress,
this.isDentalAllowedBackend, this.isDentalAllowedBackend,
this.languageID, this.languageID,
this.orderDate, this.orderDate,
this.patientID, this.patientID,
this.patientIditificationNum, this.patientIditificationNum,
this.patientMobileNumber, this.patientMobileNumber,
this.patientName, this.patientName,
this.patientOutSA, this.patientOutSA,
this.patientType, this.patientType,
this.patientTypeID, this.patientTypeID,
this.projectID, this.projectID,
this.projectName, this.projectName,
this.radResult, this.radResult,
this.sessionID, this.sessionID,
this.setupID, this.setupID,
this.to, this.to,
this.tokenID, this.tokenID,
this.versionID}); this.versionID});
RequestSendRadReportEmail.fromJson(Map<String, dynamic> json) { RequestSendRadReportEmail.fromJson(Map<String, dynamic> json) {
channel = json['Channel']; channel = json['Channel'];

@ -1,10 +1,10 @@
class AppointmentDetails { class AppointmentDetails {
String setupID; String? setupID;
int projectID; int? projectID;
int patientID; int? patientID;
int appointmentNo; int? appointmentNo;
int clinicID; int? clinicID;
int doctorID; int? doctorID;
dynamic startTime; dynamic startTime;
dynamic endTime; dynamic endTime;
dynamic appointmentDate; dynamic appointmentDate;

@ -1,26 +1,26 @@
class AppointmentRate { class AppointmentRate {
int rate; int? rate;
int appointmentNo; int? appointmentNo;
int projectID; int? projectID;
int doctorID; int? doctorID;
int clinicID; int? clinicID;
String note; String? note;
String mobileNumber; String? mobileNumber;
int createdBy; int? createdBy;
int editedBy; int? editedBy;
double versionID; double? versionID;
int channel; int? channel;
int languageID; int? languageID;
String iPAdress; String? iPAdress;
String generalid; String? generalid;
int patientOutSA; int? patientOutSA;
String sessionID; String? sessionID;
bool isDentalAllowedBackend; bool? isDentalAllowedBackend;
int deviceTypeID; int? deviceTypeID;
int patientID; int? patientID;
String tokenID; String? tokenID;
int patientTypeID; int? patientTypeID;
int patientType; int? patientType;
AppointmentRate( AppointmentRate(
{this.rate, {this.rate,

@ -1,40 +1,40 @@
class AppoitmentRated { class AppoitmentRated {
String setupID; String? setupID;
int projectID; int? projectID;
int appointmentNo; int? appointmentNo;
String appointmentDate; String? appointmentDate;
String appointmentDateN; String? appointmentDateN;
int appointmentType; int? appointmentType;
String bookDate; String? bookDate;
int patientType; int? patientType;
int patientID; int? patientID;
int clinicID; int? clinicID;
int doctorID; int? doctorID;
String endDate; String? endDate;
String startTime; String? startTime;
String endTime; String? endTime;
int status; int? status;
int visitType; int? visitType;
int visitFor; int? visitFor;
int patientStatusType; int? patientStatusType;
int companyID; int? companyID;
int bookedBy; int? bookedBy;
String bookedOn; String? bookedOn;
int confirmedBy; int? confirmedBy;
String confirmedOn; String? confirmedOn;
int arrivalChangedBy; int? arrivalChangedBy;
String arrivedOn; String? arrivedOn;
int editedBy; int? editedBy;
String editedOn; String? editedOn;
Null doctorName; Null doctorName;
String doctorNameN; String? doctorNameN;
String statusDesc; String? statusDesc;
String statusDescN; String? statusDescN;
bool vitalStatus; bool? vitalStatus;
Null vitalSignAppointmentNo; Null vitalSignAppointmentNo;
int episodeID; int? episodeID;
String doctorTitle; String? doctorTitle;
bool isAppoitmentLiveCare; bool? isAppoitmentLiveCare;
AppoitmentRated( AppoitmentRated(
{this.setupID, {this.setupID,

@ -1,33 +1,33 @@
import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
class Reports { class Reports {
int status; int? status;
DateTime encounterDate; DateTime? encounterDate;
int projectID; int? projectID;
int invoiceNo; int? invoiceNo;
int encounterNo; int? encounterNo;
String procedureId; String? procedureId;
int requestType; int? requestType;
String setupId; String? setupId;
int patientID; int? patientID;
int doctorID; int? doctorID;
dynamic clinicID; dynamic clinicID;
DateTime requestDate; DateTime? requestDate;
bool isRead; bool? isRead;
DateTime isReadOn; DateTime? isReadOn;
int actualDoctorRate; int? actualDoctorRate;
String clinicDescription; String? clinicDescription;
dynamic clinicDescriptionN; dynamic clinicDescriptionN;
String docName; String? docName;
Null docNameN; Null docNameN;
String doctorImageURL; String? doctorImageURL;
dynamic doctorName; dynamic doctorName;
dynamic doctorNameN; dynamic doctorNameN;
int doctorRate; int? doctorRate;
bool isDoctorAllowVedioCall; bool? isDoctorAllowVedioCall;
bool isExecludeDoctor; bool? isExecludeDoctor;
int noOfPatientsRate; int? noOfPatientsRate;
String projectName; String? projectName;
dynamic projectNameN; dynamic projectNameN;
Reports( Reports(
@ -133,11 +133,11 @@ class Reports {
} }
class ReportsList { class ReportsList {
String filterName = ""; String? filterName = "";
List<Reports> reportsList = List(); List<Reports> reportsList =[];
ReportsList({this.filterName, Reports reports}) { ReportsList({this.filterName, Reports? reports}) {
reportsList.add(reports); reportsList.add(reports!);
} }
} }

@ -1,58 +1,58 @@
class AdmissionMedicalReport { class AdmissionMedicalReport {
int rowID; int? rowID;
String setupID; String? setupID;
int projectID; int? projectID;
int admissionNo; int? admissionNo;
String admissionDate; String? admissionDate;
int admissionRequestNo; int? admissionRequestNo;
int admissionType; int? admissionType;
int patientType; int? patientType;
int patientID; int? patientID;
int clinicID; int? clinicID;
int doctorID; int? doctorID;
int admittingClinicID; int? admittingClinicID;
int admittingDoctorID; int? admittingDoctorID;
int categoryID; int? categoryID;
String roomID; String? roomID;
String bedID; String? bedID;
String dischargeDate; String? dischargeDate;
int approvalNo; int? approvalNo;
dynamic relativeID; dynamic relativeID;
String registrationDate; String? registrationDate;
String firstName; String? firstName;
String middleName; String? middleName;
String lastName; String? lastName;
String firstNameN; String? firstNameN;
String middleNameN; String? middleNameN;
String lastNameN; String? lastNameN;
int patientCategory; int? patientCategory;
int gender; int? gender;
String dateofBirth; String? dateofBirth;
String dateofBirthN; String? dateofBirthN;
String nationalityID; String? nationalityID;
String firstVisit; String? firstVisit;
String lastVisit; String? lastVisit;
int noOfVisit; int? noOfVisit;
String mobileNumber; String? mobileNumber;
String patientIdentificationNo; String? patientIdentificationNo;
int sTATUS; int? sTATUS;
int admissionStatus; int? admissionStatus;
int buildingID; int? buildingID;
String buildingDescription; String? buildingDescription;
String buildingDescriptionN; String? buildingDescriptionN;
int floorID; int? floorID;
int bedGender; int? bedGender;
int tariffType; int? tariffType;
dynamic cRSVerificationStatus; dynamic cRSVerificationStatus;
String nursingStationID; String? nursingStationID;
String description; String? description;
String clinicName; String? clinicName;
String doctorNameObj; String? doctorNameObj;
int patientDataVerified; int? patientDataVerified;
String projectName; String? projectName;
dynamic projectNameN; dynamic projectNameN;
String statusDescription; String? statusDescription;
String statusDescriptionN; String? statusDescriptionN;
AdmissionMedicalReport( AdmissionMedicalReport(
{this.rowID, {this.rowID,

@ -1,20 +1,20 @@
class RequestReportHistory { class RequestReportHistory {
int projectID; int? projectID;
int clinicID; int? clinicID;
bool isForMedicalReport; bool? isForMedicalReport;
double versionID; double? versionID;
int channel; int? channel;
int languageID; int? languageID;
String iPAdress; String? iPAdress;
String generalid; String? generalid;
int patientOutSA; int? patientOutSA;
String sessionID; String? sessionID;
bool isDentalAllowedBackend; bool? isDentalAllowedBackend;
int deviceTypeID; int? deviceTypeID;
int patientID; int? patientID;
String tokenID; String? tokenID;
int patientTypeID; int? patientTypeID;
int patientType; int? patientType;
RequestReportHistory( RequestReportHistory(
{this.projectID, {this.projectID,

@ -1,21 +1,21 @@
class RequestReports { class RequestReports {
bool isReport; bool? isReport;
int encounterType; int? encounterType;
int requestType; int? requestType;
double versionID; double? versionID;
int channel; int? channel;
int languageID; int? languageID;
String iPAdress; String? iPAdress;
String generalid; String? generalid;
int patientOutSA; int? patientOutSA;
String sessionID; String? sessionID;
bool isDentalAllowedBackend; bool? isDentalAllowedBackend;
int deviceTypeID; int? deviceTypeID;
int patientID; int? patientID;
String tokenID; String? tokenID;
int patientTypeID; int? patientTypeID;
int patientType; int? patientType;
int projectID; int? projectID;
RequestReports( RequestReports(
{this.isReport, {this.isReport,

@ -1,32 +1,32 @@
class SearchProductsModel { class SearchProductsModel {
String id; String? id;
String name; String? name;
String namen; String? namen;
List<LocalizedNames> localizedNames; List<LocalizedNames>? localizedNames;
String shortDescription; String? shortDescription;
String fullDescription; String? fullDescription;
String fullDescriptionn; String? fullDescriptionn;
dynamic approvedRatingSum; dynamic approvedRatingSum;
dynamic approvedTotalReviews; dynamic approvedTotalReviews;
String sku; String? sku;
bool isRx; bool? isRx;
dynamic rxMessage; dynamic rxMessage;
dynamic rxMessagen; dynamic rxMessagen;
dynamic stockQuantity; dynamic stockQuantity;
String stockAvailability; String? stockAvailability;
String stockAvailabilityn; String? stockAvailabilityn;
bool allowBackInStockSubscriptions; bool? allowBackInStockSubscriptions;
dynamic orderMinimumQuantity; dynamic orderMinimumQuantity;
dynamic orderMaximumQuantity; dynamic orderMaximumQuantity;
double price; double? price;
dynamic oldPrice; dynamic oldPrice;
dynamic discountName; dynamic discountName;
dynamic discountNamen; dynamic discountNamen;
dynamic discountPercentage; dynamic discountPercentage;
dynamic displayOrder; dynamic displayOrder;
List<dynamic> discountIds; List<dynamic>? discountIds;
List<dynamic> reviews; List<dynamic>? reviews;
List<Images> images; List<Images>? images;
SearchProductsModel( SearchProductsModel(
{this.id, {this.id,
@ -63,9 +63,9 @@ class SearchProductsModel {
name = json['name']; name = json['name'];
namen = json['namen']; namen = json['namen'];
if (json['localized_names'] != null) { if (json['localized_names'] != null) {
localizedNames = new List<LocalizedNames>(); localizedNames = [];
json['localized_names'].forEach((v) { json['localized_names'].forEach((v) {
localizedNames.add(new LocalizedNames.fromJson(v)); localizedNames!.add(new LocalizedNames.fromJson(v));
}); });
} }
shortDescription = json['short_description']; shortDescription = json['short_description'];
@ -91,9 +91,9 @@ class SearchProductsModel {
displayOrder = json['display_order']; displayOrder = json['display_order'];
if (json['images'] != null) { if (json['images'] != null) {
images = new List<Images>(); images = [];
json['images'].forEach((v) { json['images'].forEach((v) {
images.add(new Images.fromJson(v)); images!.add(new Images.fromJson(v));
}); });
} }
} }
@ -104,8 +104,7 @@ class SearchProductsModel {
data['name'] = this.name; data['name'] = this.name;
data['namen'] = this.namen; data['namen'] = this.namen;
if (this.localizedNames != null) { if (this.localizedNames != null) {
data['localized_names'] = data['localized_names'] = this.localizedNames!.map((v) => v.toJson()).toList();
this.localizedNames.map((v) => v.toJson()).toList();
} }
data['short_description'] = this.shortDescription; data['short_description'] = this.shortDescription;
data['full_description'] = this.fullDescription; data['full_description'] = this.fullDescription;
@ -119,8 +118,7 @@ class SearchProductsModel {
data['stock_quantity'] = this.stockQuantity; data['stock_quantity'] = this.stockQuantity;
data['stock_availability'] = this.stockAvailability; data['stock_availability'] = this.stockAvailability;
data['stock_availabilityn'] = this.stockAvailabilityn; data['stock_availabilityn'] = this.stockAvailabilityn;
data['allow_back_in_stock_subscriptions'] = data['allow_back_in_stock_subscriptions'] = this.allowBackInStockSubscriptions;
this.allowBackInStockSubscriptions;
data['order_minimum_quantity'] = this.orderMinimumQuantity; data['order_minimum_quantity'] = this.orderMinimumQuantity;
data['order_maximum_quantity'] = this.orderMaximumQuantity; data['order_maximum_quantity'] = this.orderMaximumQuantity;
data['price'] = this.price; data['price'] = this.price;
@ -131,15 +129,15 @@ class SearchProductsModel {
data['display_order'] = this.displayOrder; data['display_order'] = this.displayOrder;
if (this.images != null) { if (this.images != null) {
data['images'] = this.images.map((v) => v.toJson()).toList(); data['images'] = this.images!.map((v) => v.toJson()).toList();
} }
return data; return data;
} }
} }
class LocalizedNames { class LocalizedNames {
int languageId; int? languageId;
String localizedName; String? localizedName;
LocalizedNames({this.languageId, this.localizedName}); LocalizedNames({this.languageId, this.localizedName});
@ -157,11 +155,11 @@ class LocalizedNames {
} }
class Images { class Images {
int id; int? id;
int position; int? position;
String src; String? src;
String thumb; String? thumb;
String attachment; String? attachment;
Images({this.id, this.position, this.src, this.thumb, this.attachment}); Images({this.id, this.position, this.src, this.thumb, this.attachment});

@ -1,16 +1,16 @@
class AdmissionStatusForSickLeave { class AdmissionStatusForSickLeave {
String setupID; String? setupID;
int projectID; int? projectID;
int patientID; int? patientID;
int patientType; int? patientType;
int requestNo; int? requestNo;
String requestDate; String? requestDate;
int sickLeaveDays; int? sickLeaveDays;
int appointmentNo; int? appointmentNo;
int admissionNo; int? admissionNo;
String reportDate; String? reportDate;
String placeOfWork; String? placeOfWork;
int status; int? status;
dynamic dischargeDate; dynamic dischargeDate;
AdmissionStatusForSickLeave( AdmissionStatusForSickLeave(

@ -1,39 +1,39 @@
import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
class SickLeave { class SickLeave {
String setupID; String? setupID;
int projectID; int? projectID;
int patientID; int? patientID;
int patientType; int? patientType;
int clinicID; int? clinicID;
int doctorID; int? doctorID;
int requestNo; int? requestNo;
DateTime requestDate; DateTime? requestDate;
int sickLeaveDays; int? sickLeaveDays;
int appointmentNo; int? appointmentNo;
int admissionNo; int? admissionNo;
int actualDoctorRate; int? actualDoctorRate;
DateTime appointmentDate; DateTime? appointmentDate;
String clinicName; String? clinicName;
String doctorImageURL; String? doctorImageURL;
String doctorName; String? doctorName;
int doctorRate; int? doctorRate;
String doctorTitle; String? doctorTitle;
int gender; int? gender;
String genderDescription; String? genderDescription;
bool isActiveDoctorProfile; bool? isActiveDoctorProfile;
bool isDoctorAllowVedioCall; bool? isDoctorAllowVedioCall;
bool isExecludeDoctor; bool? isExecludeDoctor;
bool isInOutPatient; bool? isInOutPatient;
String isInOutPatientDescription; String? isInOutPatientDescription;
String isInOutPatientDescriptionN; String? isInOutPatientDescriptionN;
int noOfPatientsRate; int? noOfPatientsRate;
Null patientName; Null patientName;
String projectName; String? projectName;
String qR; String? qR;
List<String> speciality; List<String>? speciality;
bool isLiveCareAppointment; bool? isLiveCareAppointment;
int status; int? status;
SickLeave( SickLeave(
{this.setupID, {this.setupID,
@ -114,7 +114,7 @@ class SickLeave {
data['ClinicID'] = this.clinicID; data['ClinicID'] = this.clinicID;
data['DoctorID'] = this.doctorID; data['DoctorID'] = this.doctorID;
data['RequestNo'] = this.requestNo; data['RequestNo'] = this.requestNo;
data['RequestDate'] = DateUtil.convertDateToString(requestDate); data['RequestDate'] = DateUtil.convertDateToString(requestDate!);
data['SickLeaveDays'] = this.sickLeaveDays; data['SickLeaveDays'] = this.sickLeaveDays;
data['AppointmentNo'] = this.appointmentNo; data['AppointmentNo'] = this.appointmentNo;
data['AdmissionNo'] = this.admissionNo; data['AdmissionNo'] = this.admissionNo;

@ -1,76 +1,76 @@
class VaccineModel { class VaccineModel {
String setupID; String? setupID;
int projectID; int? projectID;
int patientID; int? patientID;
int invoiceNo; int? invoiceNo;
String procedureID; String? procedureID;
String vaccineName; String? vaccineName;
dynamic vaccineNameN; dynamic vaccineNameN;
String invoiceDate; String? invoiceDate;
int doctorID; int? doctorID;
int clinicID; int? clinicID;
String firstName; String? firstName;
String middleName; String? middleName;
String lastName; String? lastName;
dynamic firstNameN; dynamic firstNameN;
dynamic middleNameN; dynamic middleNameN;
dynamic lastNameN; dynamic lastNameN;
String dateofBirth; String? dateofBirth;
int actualDoctorRate; int? actualDoctorRate;
String age; String? age;
String clinicName; String? clinicName;
String doctorImageURL; String? doctorImageURL;
String doctorName; String? doctorName;
int doctorRate; int? doctorRate;
String doctorTitle; String? doctorTitle;
int gender; int? gender;
String genderDescription; String? genderDescription;
bool isActiveDoctorProfile; bool? isActiveDoctorProfile;
bool isDoctorAllowVedioCall; bool? isDoctorAllowVedioCall;
bool isExecludeDoctor; bool? isExecludeDoctor;
int noOfPatientsRate; int? noOfPatientsRate;
String patientName; String? patientName;
String projectName; String? projectName;
String qR; String? qR;
List<String> speciality; List<String>? speciality;
String vaccinationDate; String? vaccinationDate;
VaccineModel( VaccineModel(
{this.setupID, {this.setupID,
this.projectID, this.projectID,
this.patientID, this.patientID,
this.invoiceNo, this.invoiceNo,
this.procedureID, this.procedureID,
this.vaccineName, this.vaccineName,
this.vaccineNameN, this.vaccineNameN,
this.invoiceDate, this.invoiceDate,
this.doctorID, this.doctorID,
this.clinicID, this.clinicID,
this.firstName, this.firstName,
this.middleName, this.middleName,
this.lastName, this.lastName,
this.firstNameN, this.firstNameN,
this.middleNameN, this.middleNameN,
this.lastNameN, this.lastNameN,
this.dateofBirth, this.dateofBirth,
this.actualDoctorRate, this.actualDoctorRate,
this.age, this.age,
this.clinicName, this.clinicName,
this.doctorImageURL, this.doctorImageURL,
this.doctorName, this.doctorName,
this.doctorRate, this.doctorRate,
this.doctorTitle, this.doctorTitle,
this.gender, this.gender,
this.genderDescription, this.genderDescription,
this.isActiveDoctorProfile, this.isActiveDoctorProfile,
this.isDoctorAllowVedioCall, this.isDoctorAllowVedioCall,
this.isExecludeDoctor, this.isExecludeDoctor,
this.noOfPatientsRate, this.noOfPatientsRate,
this.patientName, this.patientName,
this.projectName, this.projectName,
this.qR, this.qR,
this.speciality, this.speciality,
this.vaccinationDate}); this.vaccinationDate});
VaccineModel.fromJson(Map<String, dynamic> json) { VaccineModel.fromJson(Map<String, dynamic> json) {
setupID = json['SetupID']; setupID = json['SetupID'];

@ -1,6 +1,6 @@
class VaccinationItem { class VaccinationItem {
String dESCRIPTION; String? dESCRIPTION;
String iTEMCODE; String? iTEMCODE;
VaccinationItem({this.dESCRIPTION, this.iTEMCODE}); VaccinationItem({this.dESCRIPTION, this.iTEMCODE});

@ -1,12 +1,12 @@
class VaccinationOnHand { class VaccinationOnHand {
int distanceInKilometers; int? distanceInKilometers;
int iTEMONHAND; int? iTEMONHAND;
bool isThereItems; bool? isThereItems;
String oRGANIZATIONCODE; String? oRGANIZATIONCODE;
String oRGANIZATIONNAME; String? oRGANIZATIONNAME;
String projectAlias; String? projectAlias;
int projectID; int? projectID;
String projectName; String? projectName;
VaccinationOnHand( VaccinationOnHand(
{this.distanceInKilometers, {this.distanceInKilometers,

@ -1,18 +1,18 @@
class VitalSignReqModel { class VitalSignReqModel {
int patientID; int? patientID;
int projectID; int? projectID;
int patientTypeID; int? patientTypeID;
int inOutpatientType; int? inOutpatientType;
int transNo; int? transNo;
int languageID; int? languageID;
String stamp ; String? stamp ;
String iPAdress; String? iPAdress;
double versionID; double? versionID;
int channel; int? channel;
String tokenID; String? tokenID;
String sessionID; String? sessionID;
bool isLoginForDoctorApp; bool? isLoginForDoctorApp;
bool patientOutSA; bool? patientOutSA;
VitalSignReqModel( VitalSignReqModel(
{this.patientID, {this.patientID,

@ -27,9 +27,9 @@ class VitalSignResModel {
var painDuration; var painDuration;
var painCharacter; var painCharacter;
var painFrequency; var painFrequency;
bool isPainManagementDone; bool? isPainManagementDone;
var status; var status;
bool isVitalsRequired; bool? isVitalsRequired;
var patientID; var patientID;
var createdOn; var createdOn;
var doctorID; var doctorID;
@ -37,7 +37,7 @@ class VitalSignResModel {
var triageCategory; var triageCategory;
var gCScore; var gCScore;
var lineItemNo; var lineItemNo;
DateTime vitalSignDate; DateTime? vitalSignDate;
var actualTimeTaken; var actualTimeTaken;
var sugarLevel; var sugarLevel;
var fBS; var fBS;

@ -1,32 +1,32 @@
class WeatherIndicatorModel { class WeatherIndicatorModel {
Null date; Null date;
int languageID; int? languageID;
int serviceName; int? serviceName;
Null time; Null time;
Null androidLink; Null androidLink;
Null authenticationTokenID; Null authenticationTokenID;
Null data; Null data;
bool dataw; bool? dataw;
int dietType; int? dietType;
Null errorCode; Null errorCode;
Null errorEndUserMessage; Null errorEndUserMessage;
Null errorEndUserMessageN; Null errorEndUserMessageN;
Null errorMessage; Null errorMessage;
int errorType; int? errorType;
int foodCategory; int? foodCategory;
Null iOSLink; Null iOSLink;
bool isAuthenticated; bool? isAuthenticated;
int mealOrderStatus; int? mealOrderStatus;
int mealType; int? mealType;
int messageStatus; int? messageStatus;
int numberOfResultRecords; int? numberOfResultRecords;
Null patientBlodType; Null patientBlodType;
Null successMsg; Null successMsg;
Null successMsgN; Null successMsgN;
Null citiesList; Null citiesList;
Null cityName; Null cityName;
Null get5DaysWeatherForecastList; Null get5DaysWeatherForecastList;
List<GetCityInfoList> getCityInfoList; List<GetCityInfoList>? getCityInfoList;
Null getTodayWeatherForecastList; Null getTodayWeatherForecastList;
Null iniciesList; Null iniciesList;
@ -91,9 +91,9 @@ class WeatherIndicatorModel {
cityName = json['CityName']; cityName = json['CityName'];
get5DaysWeatherForecastList = json['Get5DaysWeatherForecastList']; get5DaysWeatherForecastList = json['Get5DaysWeatherForecastList'];
if (json['GetCityInfo_List'] != null) { if (json['GetCityInfo_List'] != null) {
getCityInfoList = new List<GetCityInfoList>(); getCityInfoList = [];
json['GetCityInfo_List'].forEach((v) { json['GetCityInfo_List'].forEach((v) {
getCityInfoList.add(new GetCityInfoList.fromJson(v)); getCityInfoList!.add(new GetCityInfoList.fromJson(v));
}); });
} }
getTodayWeatherForecastList = json['GetTodayWeatherForecastList']; getTodayWeatherForecastList = json['GetTodayWeatherForecastList'];
@ -131,7 +131,7 @@ class WeatherIndicatorModel {
data['Get5DaysWeatherForecastList'] = this.get5DaysWeatherForecastList; data['Get5DaysWeatherForecastList'] = this.get5DaysWeatherForecastList;
if (this.getCityInfoList != null) { if (this.getCityInfoList != null) {
data['GetCityInfo_List'] = data['GetCityInfo_List'] =
this.getCityInfoList.map((v) => v.toJson()).toList(); this.getCityInfoList!.map((v) => v.toJson()).toList();
} }
data['GetTodayWeatherForecastList'] = this.getTodayWeatherForecastList; data['GetTodayWeatherForecastList'] = this.getTodayWeatherForecastList;
data['IniciesList'] = this.iniciesList; data['IniciesList'] = this.iniciesList;
@ -140,25 +140,25 @@ class WeatherIndicatorModel {
} }
class GetCityInfoList { class GetCityInfoList {
CategoriesNames categoriesNames; CategoriesNames? categoriesNames;
String category; String? category;
String categoryValue; String? categoryValue;
int cityID; int? cityID;
String cityName; String? cityName;
String cityNameN; String? cityNameN;
String colorName; String? colorName;
String createdOn; String? createdOn;
String iD; String? iD;
int iniceID; int? iniceID;
bool isOrderEmpty; bool? isOrderEmpty;
bool isValuesReversed; bool? isValuesReversed;
bool language; bool? language;
double latitude; double? latitude;
double longitude; double? longitude;
String name; String? name;
int orderNum; int? orderNum;
double temperature; double? temperature;
String value; String? value;
GetCityInfoList( GetCityInfoList(
{this.categoriesNames, {this.categoriesNames,
@ -208,7 +208,7 @@ class GetCityInfoList {
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>(); final Map<String, dynamic> data = new Map<String, dynamic>();
if (this.categoriesNames != null) { if (this.categoriesNames != null) {
data['CategoriesNames'] = this.categoriesNames.toJson(); data['CategoriesNames'] = this.categoriesNames!.toJson();
} }
data['Category'] = this.category; data['Category'] = this.category;
data['CategoryValue'] = this.categoryValue; data['CategoryValue'] = this.categoryValue;
@ -233,11 +233,11 @@ class GetCityInfoList {
} }
class CategoriesNames { class CategoriesNames {
String category1; String? category1;
String category2; String? category2;
String category3; String? category3;
String category4; String? category4;
String category5; String? category5;
CategoriesNames( CategoriesNames(
{this.category1, {this.category1,

@ -9,9 +9,9 @@ import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/H2O/user_p
import 'package:diplomaticquarterapp/core/service/base_service.dart'; import 'package:diplomaticquarterapp/core/service/base_service.dart';
class H2OService extends BaseService { class H2OService extends BaseService {
List<UserProgressForTodayDataModel> userProgressForTodayDataList = List(); List<UserProgressForTodayDataModel> userProgressForTodayDataList = [];
List<UserProgressForWeekDataModel> userProgressForWeekDataList = List(); List<UserProgressForWeekDataModel> userProgressForWeekDataList =[];
List<UserProgressForMonthDataModel> userProgressForMonthDataList = List(); List<UserProgressForMonthDataModel> userProgressForMonthDataList = [];
UserProgressRequestModel userProgressRequestModel = UserProgressRequestModel(); UserProgressRequestModel userProgressRequestModel = UserProgressRequestModel();
UserDetailModel userDetailModel = UserDetailModel(); UserDetailModel userDetailModel = UserDetailModel();

@ -14,13 +14,13 @@ import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealth
import '../base_service.dart'; import '../base_service.dart';
class CMCService extends BaseService { class CMCService extends BaseService {
List<GetCMCServicesResponseModel> cmcAllServicesList = List(); List<GetCMCServicesResponseModel> cmcAllServicesList = [];
List<GetCMCAllOrdersResponseModel> cmcAllPresOrdersList = List(); List<GetCMCAllOrdersResponseModel> cmcAllPresOrdersList = [];
List<GetOrderDetailByOrderIDResponseModel> cmcAllOrderDetail = List(); List<GetOrderDetailByOrderIDResponseModel> cmcAllOrderDetail = [];
List<CMCGetItemsResponseModel> checkupItemsList = List(); List<CMCGetItemsResponseModel> checkupItemsList = [];
bool isOrderUpdated; bool? isOrderUpdated;
Future getCMCAllServices() async { Future getCMCAllServices() async {
GetCMCServicesRequestModel getCMCServicesRequestModel = GetCMCServicesRequestModel getCMCServicesRequestModel =
@ -130,10 +130,10 @@ class CMCService extends BaseService {
}, body: updatePresOrderRequestModel.toJson()); }, body: updatePresOrderRequestModel.toJson());
} }
Future<String> insertCMCOrderRC({CMCInsertPresOrderRequestModel order}) async { Future<String> insertCMCOrderRC({CMCInsertPresOrderRequestModel? order}) async {
hasError = false; hasError = false;
String reqId = ""; String reqId = "";
order.latitude = 0.0; order!.latitude = 0.0;
order.longitude = 0.0; order.longitude = 0.0;
await baseAppClient.post(ADD_CMC_ORDER_RC, isRCService: true, onSuccess: (dynamic response, int statusCode) { await baseAppClient.post(ADD_CMC_ORDER_RC, isRCService: true, onSuccess: (dynamic response, int statusCode) {
isOrderUpdated = true; isOrderUpdated = true;
@ -145,7 +145,7 @@ class CMCService extends BaseService {
return reqId; return reqId;
} }
Future<String> insertPresPresOrder({CMCInsertPresOrderRequestModel order}) async { Future<String> insertPresPresOrder({CMCInsertPresOrderRequestModel? order}) async {
hasError = false; hasError = false;
String reqId = ""; String reqId = "";
await baseAppClient.post(PATIENT_ER_INSERT_PRES_ORDER, onSuccess: (dynamic response, int statusCode) { await baseAppClient.post(PATIENT_ER_INSERT_PRES_ORDER, onSuccess: (dynamic response, int statusCode) {
@ -154,7 +154,7 @@ class CMCService extends BaseService {
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
super.error = error; super.error = error;
}, body: order.toJson()); }, body: order!.toJson());
return reqId; return reqId;
} }
} }

@ -7,12 +7,12 @@ import 'package:intl/intl.dart';
import '../base_service.dart'; import '../base_service.dart';
class CustomerAddressesService extends BaseService { class CustomerAddressesService extends BaseService {
List<AddressInfo> addressesList = List(); List<AddressInfo> addressesList = [];
CustomerInfo customerInfo = new CustomerInfo(); CustomerInfo customerInfo = new CustomerInfo();
Future addAddressInfo({AddNewAddressRequestModel addNewAddressRequestModel}) async { Future addAddressInfo({AddNewAddressRequestModel? addNewAddressRequestModel}) async {
var customerId = await sharedPref.getString(PHARMACY_CUSTOMER_ID); var customerId = await sharedPref.getString(PHARMACY_CUSTOMER_ID);
addNewAddressRequestModel.customer.email = addNewAddressRequestModel.customer.addresses[0].email; addNewAddressRequestModel!.customer.email = addNewAddressRequestModel.customer.addresses[0].email;
addNewAddressRequestModel.customer.id = customerId; addNewAddressRequestModel.customer.id = customerId;
addNewAddressRequestModel.customer.roleIds = [3]; addNewAddressRequestModel.customer.roleIds = [3];
addNewAddressRequestModel.customer.addresses[0].phoneNumber = addNewAddressRequestModel.customer.addresses[0].phoneNumber; addNewAddressRequestModel.customer.addresses[0].phoneNumber = addNewAddressRequestModel.customer.addresses[0].phoneNumber;
@ -65,7 +65,7 @@ class CustomerAddressesService extends BaseService {
} }
class CustomerInfo { class CustomerInfo {
bool isRegistered; bool? isRegistered;
dynamic userName; dynamic userName;
dynamic password; dynamic password;
dynamic email; dynamic email;
@ -99,24 +99,24 @@ class CustomerInfo {
} }
class AddressInfo { class AddressInfo {
String id; String? id;
String firstName; String? firstName;
String lastName; String? lastName;
String email; String? email;
dynamic company; dynamic company;
dynamic countryId; dynamic countryId;
String country; String? country;
dynamic stateProvinceId; dynamic stateProvinceId;
String city; String? city;
String address1; String? address1;
String address2; String? address2;
String zipPostalCode; String? zipPostalCode;
String phoneNumber; String? phoneNumber;
dynamic faxNumber; dynamic faxNumber;
String customerAttributes; String? customerAttributes;
String createdOnUtc; String? createdOnUtc;
dynamic province; dynamic province;
String latLong; String? latLong;
AddressInfo( AddressInfo(
{this.id, {this.id,

@ -10,23 +10,23 @@ import 'package:diplomaticquarterapp/core/service/base_service.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
class EReferralService extends BaseService { class EReferralService extends BaseService {
List<GetAllRelationshipTypeResponseModel> _relationTypes = List(); List<GetAllRelationshipTypeResponseModel> _relationTypes =[];
List<GetAllRelationshipTypeResponseModel> get relationTypes => _relationTypes; List<GetAllRelationshipTypeResponseModel> get relationTypes => _relationTypes;
List<GetAllCitiesResponseModel> _allCities = List(); List<GetAllCitiesResponseModel> _allCities = [];
List<GetAllCitiesResponseModel> get allCities => _allCities; List<GetAllCitiesResponseModel> get allCities => _allCities;
List<SearchEReferralResponseModel> _allReferral = List(); List<SearchEReferralResponseModel> _allReferral = [];
List<SearchEReferralResponseModel> get allReferral => _allReferral; List<SearchEReferralResponseModel> get allReferral => _allReferral;
String _activationCode; String? _activationCode;
String _logInTokenID; String? _logInTokenID;
String _referralNumber; String? _referralNumber;
String get activationCode => _activationCode; String get activationCode => _activationCode!;
String get referralNumber => _referralNumber; String get referralNumber => _referralNumber!;
bool _isActivationCodeValid = false; bool _isActivationCodeValid = false;

@ -13,8 +13,8 @@ class BariatricsService extends BaseService {
List<GetDoctorListModel> doctorList = []; List<GetDoctorListModel> doctorList = [];
List<DoctorListByTimeModel> doctorListByTime = []; List<DoctorListByTimeModel> doctorListByTime = [];
double lat; double? lat;
double long; double? long;
Future getClinicCategory() async { Future getClinicCategory() async {
hasError = false; hasError = false;
@ -76,7 +76,7 @@ class BariatricsService extends BaseService {
}, body: body); }, body: body);
} }
Future getDoctorList({@required DiseasesByClinic disease}) async { Future getDoctorList({required DiseasesByClinic disease}) async {
hasError = false; hasError = false;
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar'); var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
@ -106,7 +106,7 @@ class BariatricsService extends BaseService {
}, body: body); }, body: body);
} }
Future getCalculationDoctors({@required int calculationID}) async { Future getCalculationDoctors({required int calculationID}) async {
if (await this.sharedPref.getDouble(USER_LAT) != null && await this.sharedPref.getDouble(USER_LONG) != null) { if (await this.sharedPref.getDouble(USER_LAT) != null && await this.sharedPref.getDouble(USER_LONG) != null) {
lat = await this.sharedPref.getDouble(USER_LAT); lat = await this.sharedPref.getDouble(USER_LAT);

@ -13,15 +13,15 @@ import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/customer
import '../base_service.dart'; import '../base_service.dart';
class HomeHealthCareService extends BaseService { class HomeHealthCareService extends BaseService {
List<HHCGetAllServicesResponseModel> hhcAllServicesList = List(); List<HHCGetAllServicesResponseModel> hhcAllServicesList = [];
List<GetCMCAllOrdersResponseModel> hhcAllPresOrdersList = List(); List<GetCMCAllOrdersResponseModel> hhcAllPresOrdersList = [];
List<GetOrderDetailByOrderIDResponseModel> hhcAllOrderDetail = List(); List<GetOrderDetailByOrderIDResponseModel> hhcAllOrderDetail = [];
List<AddressInfo> addressesList = List(); List<AddressInfo> addressesList = [];
dynamic hhcResponse; dynamic hhcResponse;
bool isOrderUpdated; bool? isOrderUpdated;
CustomerInfo customerInfo; CustomerInfo? customerInfo;
int requestNo; int? requestNo;
Future getHHCAllServices(HHCGetAllServicesRequestModel hHCGetAllServicesRequestModel) async { Future getHHCAllServices(HHCGetAllServicesRequestModel hHCGetAllServicesRequestModel) async {
hasError = false; hasError = false;
@ -114,7 +114,7 @@ class HomeHealthCareService extends BaseService {
}, body: updatePresOrderRequestModel.toJson()); }, body: updatePresOrderRequestModel.toJson());
} }
Future insertPresPresOrder({PatientERInsertPresOrderRequestModel order}) async { Future insertPresPresOrder({PatientERInsertPresOrderRequestModel? order}) async {
hasError = false; hasError = false;
await baseAppClient.post(INSERT_ER_INERT_PRES_ORDER, onSuccess: (dynamic response, int statusCode) { await baseAppClient.post(INSERT_ER_INERT_PRES_ORDER, onSuccess: (dynamic response, int statusCode) {
hhcResponse = response; hhcResponse = response;
@ -122,10 +122,10 @@ class HomeHealthCareService extends BaseService {
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
super.error = error; super.error = error;
}, body: order.toJson()); }, body: order!.toJson());
} }
Future insertHHCOrderRC({PatientERInsertPresOrderRequestModel order}) async { Future insertHHCOrderRC({PatientERInsertPresOrderRequestModel? order}) async {
hasError = false; hasError = false;
await baseAppClient.post(ADD_HHC_ORDER_RC, isRCService: true, onSuccess: (dynamic response, int statusCode) { await baseAppClient.post(ADD_HHC_ORDER_RC, isRCService: true, onSuccess: (dynamic response, int statusCode) {
hhcResponse = response; hhcResponse = response;
@ -133,6 +133,6 @@ class HomeHealthCareService extends BaseService {
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
super.error = error; super.error = error;
}, body: order.toJson()); }, body: order!.toJson());
} }
} }

@ -3,7 +3,7 @@ import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.da
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
class AuthenticatedUserObject { class AuthenticatedUserObject {
AuthenticatedUser user; AuthenticatedUser? user;
AppSharedPreferences sharedPref = AppSharedPreferences(); AppSharedPreferences sharedPref = AppSharedPreferences();
bool isLogin = false; bool isLogin = false;

@ -2,7 +2,7 @@ import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/core/service/base_service.dart'; import 'package:diplomaticquarterapp/core/service/base_service.dart';
class PrescriptionDeliveryService extends BaseService { class PrescriptionDeliveryService extends BaseService {
Future insertDeliveryOrder({int lineItemNo, double latitude, double longitude, int appointmentNo, int createdBy, int dischargeID}) async { Future insertDeliveryOrder({int? lineItemNo, double? latitude, double? longitude, int? appointmentNo, int? createdBy, int? dischargeID}) async {
hasError = false; hasError = false;
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();
body['LineItemNo'] = lineItemNo; body['LineItemNo'] = lineItemNo;
@ -20,7 +20,7 @@ class PrescriptionDeliveryService extends BaseService {
}, body: body); }, body: body);
} }
Future insertDeliveryOrderRC({double latitude, double longitude, int appointmentNo, int createdBy, int dischargeID, int projectID}) async { Future insertDeliveryOrderRC({double? latitude, double? longitude, int? appointmentNo, int? createdBy, int? dischargeID, int? projectID}) async {
hasError = false; hasError = false;
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();
body['latitude'] = latitude; body['latitude'] = latitude;

@ -4,10 +4,10 @@ import 'package:diplomaticquarterapp/models/anicllary-orders/ancillary_order_lis
import 'package:diplomaticquarterapp/models/anicllary-orders/ancillary_order_proc_model.dart'; import 'package:diplomaticquarterapp/models/anicllary-orders/ancillary_order_proc_model.dart';
class AncillaryOrdersService extends BaseService { class AncillaryOrdersService extends BaseService {
List<AncillaryOrdersListModel> _ancillaryLists = List(); List<AncillaryOrdersListModel> _ancillaryLists =[];
List<AncillaryOrdersListModel> get ancillaryLists => _ancillaryLists; List<AncillaryOrdersListModel> get ancillaryLists => _ancillaryLists;
List<AncillaryOrdersListProcListModel> _ancillaryProcLists = List(); List<AncillaryOrdersListProcListModel> _ancillaryProcLists =[];
List<AncillaryOrdersListProcListModel> get ancillaryProcLists => _ancillaryProcLists; List<AncillaryOrdersListProcListModel> get ancillaryProcLists => _ancillaryProcLists;

@ -5,8 +5,8 @@ import 'package:diplomaticquarterapp/core/model/rate/appoitment_rated.dart';
import 'package:diplomaticquarterapp/core/service/base_service.dart'; import 'package:diplomaticquarterapp/core/service/base_service.dart';
class AppointmentRateService extends BaseService { class AppointmentRateService extends BaseService {
List<AppoitmentRated> appointmentRatedList = List(); List<AppoitmentRated> appointmentRatedList =[];
AppointmentDetails appointmentDetails; AppointmentDetails? appointmentDetails;
Future getIsLastAppointmentRatedList() async { Future getIsLastAppointmentRatedList() async {
hasError = false; hasError = false;
@ -62,16 +62,16 @@ class AppointmentRateService extends BaseService {
"ProjectID": projectID, "ProjectID": projectID,
"AppointmentNo": appointmentNo, "AppointmentNo": appointmentNo,
"Note": note, "Note": note,
"MobileNumber": authenticatedUserObject.user.mobileNumber, "MobileNumber": authenticatedUserObject.user!.mobileNumber,
"AppointmentDate": appoDate, "AppointmentDate": appoDate,
"DoctorName": docName, "DoctorName": docName,
"ProjectName": projectName, "ProjectName": projectName,
"COCTypeName": 1, "COCTypeName": 1,
"PatientName": authenticatedUserObject.user.firstName + " " + authenticatedUserObject.user.lastName, "PatientName": authenticatedUserObject.user!.firstName + " " + authenticatedUserObject.user!.lastName,
"PatientOutSA": authenticatedUserObject.user.outSA, "PatientOutSA": authenticatedUserObject.user!.outSA,
"PatientTypeID": authenticatedUserObject.user.patientType, "PatientTypeID": authenticatedUserObject.user!.patientType,
"ClinicName": clinicName, "ClinicName": clinicName,
"PatientIdentificationID": authenticatedUserObject.user.patientIdentificationNo "PatientIdentificationID": authenticatedUserObject.user!.patientIdentificationNo
}; };
await baseAppClient.post(NEW_RATE_DOCTOR_URL, onSuccess: (dynamic response, int statusCode) {}, onFailure: (String error, int statusCode) { await baseAppClient.post(NEW_RATE_DOCTOR_URL, onSuccess: (dynamic response, int statusCode) {}, onFailure: (String error, int statusCode) {
@ -82,7 +82,7 @@ class AppointmentRateService extends BaseService {
AppoitmentRated get lastAppointmentRated { AppoitmentRated get lastAppointmentRated {
if (appointmentRatedList.length > 0) return appointmentRatedList[appointmentRatedList.length - 1]; if (appointmentRatedList.length > 0) return appointmentRatedList[appointmentRatedList.length - 1];
return null; return AppoitmentRated();
} }
deleteAppointmentRated(AppoitmentRated appointmentRated) { deleteAppointmentRated(AppoitmentRated appointmentRated) {

@ -7,7 +7,7 @@ import 'AuthenticatedUserObject.dart';
import 'client/base_app_client.dart'; import 'client/base_app_client.dart';
class BaseService { class BaseService {
String error; String? error;
bool hasError = false; bool hasError = false;
BaseAppClient baseAppClient = BaseAppClient(); BaseAppClient baseAppClient = BaseAppClient();
AuthenticatedUser user = new AuthenticatedUser(); AuthenticatedUser user = new AuthenticatedUser();
@ -18,7 +18,7 @@ class BaseService {
BaseService() { BaseService() {
authenticatedUserObject.getUser(); authenticatedUserObject.getUser();
user = authenticatedUserObject.user; user = authenticatedUserObject.user!;
// getUser(); // getUser();
} }

@ -6,10 +6,10 @@ import '../base_service.dart';
class BloodDetailsService extends BaseService{ class BloodDetailsService extends BaseService{
// List<CitiesModel> CitiesModelList = List(); // List<CitiesModel> CitiesModelList =[];
// Map<String, dynamic> body = Map(); // Map<String, dynamic> body = Map();
List<List_BloodGroupDetailsModel> BloodModelList = List(); List<List_BloodGroupDetailsModel> BloodModelList =[];
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();
Future getAllBloodOrders() async { Future getAllBloodOrders() async {
hasError = false; hasError = false;

@ -4,11 +4,11 @@ import 'package:diplomaticquarterapp/core/model/blooddonation/get_all_cities.dar
import '../base_service.dart'; import '../base_service.dart';
class BloodDonationService extends BaseService { class BloodDonationService extends BaseService {
//List<GetPatientICProjectsModel> LivechatModelList = List(); //List<GetPatientICProjectsModel> LivechatModelList =[];
// Map<String, dynamic> body = Map(); // Map<String, dynamic> body = Map();
List<CitiesModel> CitiesModelList = List(); List<CitiesModel> CitiesModelList =[];
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();
Future getAllCitiesOrders() async { Future getAllCitiesOrders() async {

@ -7,16 +7,16 @@ import 'package:diplomaticquarterapp/core/model/childvaccines/user_information_m
import '../base_service.dart'; import '../base_service.dart';
class CreteNewBabyService extends BaseService { class CreteNewBabyService extends BaseService {
List<CreateNewBaby> createNewBabyModelList = List(); List<CreateNewBaby> createNewBabyModelList =[];
List<List_UserInformationModel> userModelList = List(); List<List_UserInformationModel> userModelList =[];
List<CreateNewUser_New> newUserModelList = List(); List<CreateNewUser_New> newUserModelList =[];
Future getCreateNewBabyOrders({CreateNewBaby newChild,int userID}) async { Future getCreateNewBabyOrders({CreateNewBaby? newChild,int? userID}) async {
hasError = false; hasError = false;
await getUser(); await getUser();
Map<String, dynamic> body = Map.from(newChild.toJson()); Map<String, dynamic> body = Map.from(newChild!.toJson());
body['CreatedBy'] = 102; body['CreatedBy'] = 102;
body['EditedBy'] = 102; body['EditedBy'] = 102;
body['UserID'] = userID; body['UserID'] = userID;

@ -7,8 +7,8 @@ import 'package:diplomaticquarterapp/core/model/childvaccines/user_information_m
import '../base_service.dart'; import '../base_service.dart';
class ChildVaccinesService extends BaseService { class ChildVaccinesService extends BaseService {
List<List_BabyInformationModel> babyInformationModelList = List(); List<List_BabyInformationModel> babyInformationModelList =[];
List<List_UserInformationModel> userInformationModelList = List(); List<List_UserInformationModel> userInformationModelList =[];
int userID = 0; int userID = 0;
Future getAllBabyInformationOrders() async { Future getAllBabyInformationOrders() async {

@ -11,17 +11,17 @@ import '../base_service.dart';
class DeleteBabyService extends BaseService{ class DeleteBabyService extends BaseService{
List<CreateNewBaby> createNewBabyModelList = List(); List<CreateNewBaby> createNewBabyModelList =[];
List<List_UserInformationModel> userModelList = List(); List<List_UserInformationModel> userModelList =[];
List<CreateNewUser_New> newUserModelList = List(); List<CreateNewUser_New> newUserModelList =[];
List<DeleteBaby> deleteBabyModelList= List(); List<DeleteBaby> deleteBabyModelList=[];
Future getDeleteBabyOrder({DeleteBaby deleteChild,int babyID}) async { Future getDeleteBabyOrder({DeleteBaby? deleteChild,int? babyID}) async {
hasError = false; hasError = false;
await getUser(); await getUser();
Map<String, dynamic> body = Map.from(deleteChild.toJson()); Map<String, dynamic> body = Map.from(deleteChild!.toJson());
// body['CreatedBy'] = 102; // body['CreatedBy'] = 102;
body['EditedBy'] = 102; body['EditedBy'] = 102;
//body['BabyID'] = babyID; //body['BabyID'] = babyID;

@ -4,7 +4,7 @@ import 'package:diplomaticquarterapp/core/model/childvaccines/get_vacainations_i
import '../base_service.dart'; import '../base_service.dart';
class GetVccinationsItemsService extends BaseService { class GetVccinationsItemsService extends BaseService {
List<GET_VACCINATIONS_ITEMSMODEL> getVaccinationsItemModelList = List(); List<GET_VACCINATIONS_ITEMSMODEL> getVaccinationsItemModelList =[];
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();

@ -5,7 +5,7 @@ import 'package:diplomaticquarterapp/core/model/childvaccines/user_information_m
import '../base_service.dart'; import '../base_service.dart';
class UserInformationService extends BaseService { class UserInformationService extends BaseService {
List<List_UserInformationModel> userInformationModelList = List(); List<List_UserInformationModel> userInformationModelList =[];
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();
Future getUserInformationOrders() async { Future getUserInformationOrders() async {

@ -6,13 +6,13 @@ import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import '../base_service.dart'; import '../base_service.dart';
class VaccinationTableService extends BaseService { class VaccinationTableService extends BaseService {
List<CreateVaccinationTable> createVaccinationTableModelList = List(); List<CreateVaccinationTable> createVaccinationTableModelList =[];
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();
Future getCreateVaccinationTableOrders(List_BabyInformationModel babyInfo, bool sendEmail) async { Future getCreateVaccinationTableOrders(List_BabyInformationModel babyInfo, bool sendEmail) async {
String babyBDFormatted = "${DateUtil.convertDateToString(babyInfo.dOB)}/"; String babyBDFormatted = "${DateUtil.convertDateToString(babyInfo.dOB!)}/";
hasError = false; hasError = false;
await getUser(); await getUser();

@ -37,9 +37,9 @@ class BaseAppClient {
final _analytics = locator<GAnalytics>(); final _analytics = locator<GAnalytics>();
post(String endPoint, post(String endPoint,
{Map<String, dynamic> body, {Map<String, dynamic>? body,
Function(dynamic response, int statusCode) onSuccess, Function(dynamic response, int statusCode)? onSuccess,
Function(String error, int statusCode) onFailure, Function(String error, int statusCode)? onFailure,
bool isAllowAny = false, bool isAllowAny = false,
bool isExternal = false, bool isExternal = false,
bool isRCService = false, bool isRCService = false,
@ -63,7 +63,7 @@ class BaseAppClient {
if (endPoint == SEND_ACTIVATION_CODE) { if (endPoint == SEND_ACTIVATION_CODE) {
languageID = 'en'; languageID = 'en';
} }
if (body.containsKey('SetupID')) { if (body!.containsKey('SetupID')) {
body['SetupID'] = body.containsKey('SetupID') body['SetupID'] = body.containsKey('SetupID')
? body['SetupID'] != null ? body['SetupID'] != null
? body['SetupID'] ? body['SetupID']
@ -157,7 +157,7 @@ class BaseAppClient {
// Mobile no.: 0502303285 // Mobile no.: 0502303285
// ID: 119116817 // ID: 119116817
body.removeWhere((key, value) => key == null || value == null); body!.removeWhere((key, value) => key == null || value == null);
if (AppGlobal.isNetworkDebugEnabled) { if (AppGlobal.isNetworkDebugEnabled) {
print("URL : $url"); print("URL : $url");
@ -169,7 +169,7 @@ class BaseAppClient {
final response = await http.post(Uri.parse(url.trim()), body: json.encode(body), headers: headers); final response = await http.post(Uri.parse(url.trim()), body: json.encode(body), headers: headers);
final int statusCode = response.statusCode; final int statusCode = response.statusCode;
if (statusCode < 200 || statusCode >= 400 || json == null) { if (statusCode < 200 || statusCode >= 400 || json == null) {
onFailure('Error While Fetching data', statusCode); onFailure!('Error While Fetching data', statusCode);
logApiEndpointError(endPoint, 'Error While Fetching data', statusCode); logApiEndpointError(endPoint, 'Error While Fetching data', statusCode);
} else { } else {
var decoded = utf8.decode(response.bodyBytes); var decoded = utf8.decode(response.bodyBytes);
@ -178,10 +178,10 @@ class BaseAppClient {
// print("Response: $parsed"); // print("Response: $parsed");
if (isAllowAny) { if (isAllowAny) {
onSuccess(parsed, statusCode); onSuccess!(parsed, statusCode);
} else { } else {
if (parsed['Response_Message'] != null) { if (parsed['Response_Message'] != null) {
onSuccess(parsed, statusCode); onSuccess!(parsed, statusCode);
} else { } else {
if (parsed['ErrorType'] == 4) { if (parsed['ErrorType'] == 4) {
navigateToAppUpdate(AppGlobal.context, parsed['ErrorEndUserMessage']); navigateToAppUpdate(AppGlobal.context, parsed['ErrorEndUserMessage']);
@ -192,39 +192,39 @@ class BaseAppClient {
logApiEndpointError(endPoint, "session logged out", statusCode); logApiEndpointError(endPoint, "session logged out", statusCode);
} }
if (isAllowAny) { if (isAllowAny) {
onSuccess(parsed, statusCode); onSuccess!(parsed, statusCode);
} else if (parsed['IsAuthenticated'] == null) { } else if (parsed['IsAuthenticated'] == null) {
if (parsed['isSMSSent'] == true) { if (parsed['isSMSSent'] == true) {
onSuccess(parsed, statusCode); onSuccess!(parsed, statusCode);
} else if (parsed['MessageStatus'] == 1) { } else if (parsed['MessageStatus'] == 1) {
onSuccess(parsed, statusCode); onSuccess!(parsed, statusCode);
} else if (parsed['Result'] == 'OK') { } else if (parsed['Result'] == 'OK') {
onSuccess(parsed, statusCode); onSuccess!(parsed, statusCode);
} else { } else {
// if (parsed != null) { // if (parsed != null) {
// onSuccess(parsed, statusCode); // onSuccess(parsed, statusCode);
// } else { // } else {
onFailure(parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode); onFailure!(parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode);
logApiEndpointError(endPoint, parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode); logApiEndpointError(endPoint, parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode);
// logout(); // logout();
// } // }
} }
} else if (parsed['MessageStatus'] == 1 || parsed['SMSLoginRequired'] == true) { } else if (parsed['MessageStatus'] == 1 || parsed['SMSLoginRequired'] == true) {
onSuccess(parsed, statusCode); onSuccess!(parsed, statusCode);
} else if (parsed['MessageStatus'] == 2 && parsed['IsAuthenticated']) { } else if (parsed['MessageStatus'] == 2 && parsed['IsAuthenticated']) {
if (parsed['SameClinicApptList'] != null) { if (parsed['SameClinicApptList'] != null) {
onSuccess(parsed, statusCode); onSuccess!(parsed, statusCode);
} else { } else {
if (parsed['message'] == null && parsed['ErrorEndUserMessage'] == null) { if (parsed['message'] == null && parsed['ErrorEndUserMessage'] == null) {
if (parsed['ErrorSearchMsg'] == null) { if (parsed['ErrorSearchMsg'] == null) {
onFailure("Server Error found with no available message", statusCode); onFailure!("Server Error found with no available message", statusCode);
logApiEndpointError(endPoint, "Server Error found with no available message", statusCode); logApiEndpointError(endPoint, "Server Error found with no available message", statusCode);
} else { } else {
onFailure(parsed['ErrorSearchMsg'], statusCode); onFailure!(parsed['ErrorSearchMsg'], statusCode);
logApiEndpointError(endPoint, parsed['ErrorSearchMsg'], statusCode); logApiEndpointError(endPoint, parsed['ErrorSearchMsg'], statusCode);
} }
} else { } else {
onFailure(parsed['message'] ?? parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode); onFailure!(parsed['message'] ?? parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode);
logApiEndpointError(endPoint, parsed['message'] ?? parsed['message'], statusCode); logApiEndpointError(endPoint, parsed['message'] ?? parsed['message'], statusCode);
} }
} }
@ -234,13 +234,13 @@ class BaseAppClient {
// } // }
else { else {
if (parsed['SameClinicApptList'] != null) { if (parsed['SameClinicApptList'] != null) {
onSuccess(parsed, statusCode); onSuccess!(parsed, statusCode);
} else { } else {
if (parsed['message'] != null) { if (parsed['message'] != null) {
onFailure(parsed['message'] ?? parsed['message'], statusCode); onFailure!(parsed['message'] ?? parsed['message'], statusCode);
logApiEndpointError(endPoint, parsed['message'] ?? parsed['message'], statusCode); logApiEndpointError(endPoint, parsed['message'] ?? parsed['message'], statusCode);
} else { } else {
onFailure(parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode); onFailure!(parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode);
logApiEndpointError(endPoint, parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode); logApiEndpointError(endPoint, parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode);
} }
} }
@ -249,18 +249,18 @@ class BaseAppClient {
} }
} }
} else { } else {
onFailure('Please Check The Internet Connection', -1); onFailure!('Please Check The Internet Connection', -1);
_analytics.errorTracking.log("internet_connectivity", error: "no internet available"); _analytics.errorTracking.log("internet_connectivity", error: "no internet available");
} }
} catch (e) { } catch (e) {
print(e); print(e);
onFailure(e.toString(), -1); onFailure!(e.toString(), -1);
_analytics.errorTracking.log(endPoint, error: "api exception: $e"); _analytics.errorTracking.log(endPoint, error: "api exception: $e");
} }
} }
postPharmacy(String endPoint, postPharmacy(String endPoint,
{Map<String, dynamic> body, Function(dynamic response, int statusCode) onSuccess, Function(String error, int statusCode) onFailure, bool isAllowAny = false, bool isExternal = false}) async { {Map<String, dynamic>? body, Function(dynamic response, int statusCode)? onSuccess, Function(String error, int statusCode)? onFailure, bool isAllowAny = false, bool isExternal = false}) async {
var token = await sharedPref.getString(PHARMACY_AUTORZIE_TOKEN); var token = await sharedPref.getString(PHARMACY_AUTORZIE_TOKEN);
var user = await sharedPref.getObject(USER_PROFILE); var user = await sharedPref.getObject(USER_PROFILE);
String url; String url;
@ -349,53 +349,53 @@ class BaseAppClient {
final int statusCode = response.statusCode; final int statusCode = response.statusCode;
// print("statusCode :$statusCode"); // print("statusCode :$statusCode");
if (statusCode < 200 || statusCode >= 400 || json == null) { if (statusCode < 200 || statusCode >= 400 || json == null) {
onFailure('Error While Fetching data', statusCode); onFailure!('Error While Fetching data', statusCode);
logApiEndpointError(endPoint, 'Error While Fetching data', statusCode); logApiEndpointError(endPoint, 'Error While Fetching data', statusCode);
} else { } else {
// var parsed = json.decode(response.body.toString()); // var parsed = json.decode(response.body.toString());
var parsed = json.decode(utf8.decode(response.bodyBytes)); var parsed = json.decode(utf8.decode(response.bodyBytes));
if (parsed['Response_Message'] != null) { if (parsed['Response_Message'] != null) {
onSuccess(parsed, statusCode); onSuccess!(parsed, statusCode);
} else { } else {
if (parsed['ErrorType'] == 4) { if (parsed['ErrorType'] == 4) {
navigateToAppUpdate(AppGlobal.context, parsed['ErrorEndUserMessage']); navigateToAppUpdate(AppGlobal.context, parsed['ErrorEndUserMessage']);
logApiEndpointError(endPoint, parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode); logApiEndpointError(endPoint, parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode);
} }
if (isAllowAny) { if (isAllowAny) {
onSuccess(parsed, statusCode); onSuccess!(parsed, statusCode);
} else if (parsed['IsAuthenticated'] == null) { } else if (parsed['IsAuthenticated'] == null) {
if (parsed['isSMSSent'] == true) { if (parsed['isSMSSent'] == true) {
onSuccess(parsed, statusCode); onSuccess!(parsed, statusCode);
} else if (parsed['MessageStatus'] == 1) { } else if (parsed['MessageStatus'] == 1) {
onSuccess(parsed, statusCode); onSuccess!(parsed, statusCode);
} else if (parsed['Result'] == 'OK') { } else if (parsed['Result'] == 'OK') {
onSuccess(parsed, statusCode); onSuccess!(parsed, statusCode);
} else { } else {
if (parsed != null) { if (parsed != null) {
onSuccess(parsed, statusCode); onSuccess!(parsed, statusCode);
} else { } else {
onFailure(parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode); onFailure!(parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode);
logApiEndpointError(endPoint, parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode); logApiEndpointError(endPoint, parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode);
logApiEndpointError(endPoint, 'session logged out', statusCode); logApiEndpointError(endPoint, 'session logged out', statusCode);
logout(); logout();
} }
} }
} else if (parsed['MessageStatus'] == 1 || parsed['SMSLoginRequired'] == true) { } else if (parsed['MessageStatus'] == 1 || parsed['SMSLoginRequired'] == true) {
onSuccess(parsed, statusCode); onSuccess!(parsed, statusCode);
} else if (parsed['MessageStatus'] == 2 && parsed['IsAuthenticated']) { } else if (parsed['MessageStatus'] == 2 && parsed['IsAuthenticated']) {
if (parsed['SameClinicApptList'] != null) { if (parsed['SameClinicApptList'] != null) {
onSuccess(parsed, statusCode); onSuccess!(parsed, statusCode);
} else { } else {
if (parsed['message'] == null && parsed['ErrorEndUserMessage'] == null) { if (parsed['message'] == null && parsed['ErrorEndUserMessage'] == null) {
if (parsed['ErrorSearchMsg'] == null) { if (parsed['ErrorSearchMsg'] == null) {
onFailure("Server Error found with no available message", statusCode); onFailure!("Server Error found with no available message", statusCode);
logApiEndpointError(endPoint, "Server Error found with no available message", statusCode); logApiEndpointError(endPoint, "Server Error found with no available message", statusCode);
} else { } else {
onFailure(parsed['ErrorSearchMsg'], statusCode); onFailure!(parsed['ErrorSearchMsg'], statusCode);
logApiEndpointError(endPoint, parsed['ErrorSearchMsg'] ?? parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode); logApiEndpointError(endPoint, parsed['ErrorSearchMsg'] ?? parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode);
} }
} else { } else {
onFailure(parsed['message'] ?? parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode); onFailure!(parsed['message'] ?? parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode);
logApiEndpointError(endPoint, parsed['message'] ?? parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode); logApiEndpointError(endPoint, parsed['message'] ?? parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode);
} }
} }
@ -405,13 +405,13 @@ class BaseAppClient {
//helpers.showErrorToast('Your session expired Please login agian'); //helpers.showErrorToast('Your session expired Please login agian');
} else { } else {
if (parsed['SameClinicApptList'] != null) { if (parsed['SameClinicApptList'] != null) {
onSuccess(parsed, statusCode); onSuccess!(parsed, statusCode);
} else { } else {
if (parsed['message'] != null) { if (parsed['message'] != null) {
onFailure(parsed['message'] ?? parsed['message'], statusCode); onFailure!(parsed['message'] ?? parsed['message'], statusCode);
logApiEndpointError(endPoint, parsed['message'] ?? parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode); logApiEndpointError(endPoint, parsed['message'] ?? parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode);
} else { } else {
onFailure(parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode); onFailure!(parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode);
logApiEndpointError(endPoint, parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode); logApiEndpointError(endPoint, parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode);
} }
} }
@ -419,12 +419,12 @@ class BaseAppClient {
} }
} }
} else { } else {
onFailure('Please Check The Internet Connection', -1); onFailure!('Please Check The Internet Connection', -1);
_analytics.errorTracking.log("internet_connectivity", error: "no internet available"); _analytics.errorTracking.log("internet_connectivity", error: "no internet available");
} }
} catch (e) { } catch (e) {
print(e); print(e);
onFailure(e.toString(), -1); onFailure!(e.toString(), -1);
_analytics.errorTracking.log(endPoint, error: "api exception: $e"); _analytics.errorTracking.log(endPoint, error: "api exception: $e");
} }
} }
@ -438,9 +438,9 @@ class BaseAppClient {
} }
get(String endPoint, get(String endPoint,
{Function(dynamic response, int statusCode) onSuccess, {Function(dynamic response, int statusCode)? onSuccess,
Function(String error, int statusCode) onFailure, Function(String error, int statusCode)? onFailure,
Map<String, dynamic> queryParams, Map<String, dynamic>? queryParams,
bool isExternal = false, bool isExternal = false,
bool isRCService = false}) async { bool isRCService = false}) async {
String url; String url;
@ -469,24 +469,24 @@ class BaseAppClient {
// print("statusCode :$statusCode"); // print("statusCode :$statusCode");
if (statusCode < 200 || statusCode >= 400 || json == null) { if (statusCode < 200 || statusCode >= 400 || json == null) {
onFailure('Error While Fetching data', statusCode); onFailure!('Error While Fetching data', statusCode);
logApiEndpointError(endPoint, 'Error While Fetching data', statusCode); logApiEndpointError(endPoint, 'Error While Fetching data', statusCode);
} else { } else {
var parsed = json.decode(utf8.decode(response.bodyBytes)); var parsed = json.decode(utf8.decode(response.bodyBytes));
onSuccess(parsed, statusCode); onSuccess!(parsed, statusCode);
} }
} else { } else {
onFailure('Please Check The Internet Connection', -1); onFailure!('Please Check The Internet Connection', -1);
_analytics.errorTracking.log("internet_connectivity", error: "no internet available"); _analytics.errorTracking.log("internet_connectivity", error: "no internet available");
} }
} }
getPharmacy(String endPoint, getPharmacy(String endPoint,
{Function(dynamic response, int statusCode) onSuccess, {Function(dynamic response, int statusCode)? onSuccess,
Function(String error, int statusCode) onFailure, Function(String error, int statusCode)? onFailure,
bool isAllowAny = false, bool isAllowAny = false,
bool isExternal = false, bool isExternal = false,
Map<String, dynamic> queryParams}) async { Map<String, dynamic>? queryParams}) async {
var token = await sharedPref.getString(PHARMACY_AUTORZIE_TOKEN); var token = await sharedPref.getString(PHARMACY_AUTORZIE_TOKEN);
var user = await sharedPref.getObject(USER_PROFILE); var user = await sharedPref.getObject(USER_PROFILE);
@ -519,39 +519,39 @@ class BaseAppClient {
if (statusCode < 200 || statusCode >= 400 || json == null) { if (statusCode < 200 || statusCode >= 400 || json == null) {
if (statusCode == 401) { if (statusCode == 401) {
onFailure(TranslationBase.of(AppGlobal.context).pharmacyRelogin, statusCode); onFailure!(TranslationBase.of(AppGlobal.context).pharmacyRelogin, statusCode);
logApiEndpointError(endPoint, TranslationBase.of(AppGlobal.context).pharmacyRelogin, statusCode); logApiEndpointError(endPoint, TranslationBase.of(AppGlobal.context).pharmacyRelogin, statusCode);
Navigator.of(AppGlobal.context).pushNamed(HOME); Navigator.of(AppGlobal.context).pushNamed(HOME);
} else { } else {
var bodyUtf = json.decode(utf8.decode(response.bodyBytes)); var bodyUtf = json.decode(utf8.decode(response.bodyBytes));
// print(bodyUtf); // print(bodyUtf);
onFailure(bodyUtf['error']['ErrorEndUserMsg'], statusCode); onFailure!(bodyUtf['error']['ErrorEndUserMsg'], statusCode);
logApiEndpointError(endPoint, bodyUtf['error']['ErrorEndUserMsg'], statusCode); logApiEndpointError(endPoint, bodyUtf['error']['ErrorEndUserMsg'], statusCode);
} }
} else { } else {
// var parsed = json.decode(response.body.toString()); // var parsed = json.decode(response.body.toString());
var bodyUtf = json.decode(utf8.decode(response.bodyBytes)); var bodyUtf = json.decode(utf8.decode(response.bodyBytes));
onSuccess(bodyUtf, statusCode); onSuccess!(bodyUtf, statusCode);
} }
} else { } else {
onFailure('Please Check The Internet Connection', -1); onFailure!('Please Check The Internet Connection', -1);
_analytics.errorTracking.log("internet_connectivity", error: "no internet available"); _analytics.errorTracking.log("internet_connectivity", error: "no internet available");
} }
} }
simplePost( simplePost(
String fullUrl, { String fullUrl, {
Map<dynamic, dynamic> body, Map<dynamic, dynamic>? body,
Map<String, String> headers, Map<String, String>? headers,
Function(dynamic response, int statusCode) onSuccess, Function(dynamic response, int statusCode)? onSuccess,
Function(String error, int statusCode) onFailure, Function(String error, int statusCode)? onFailure,
}) async { }) async {
String url = fullUrl; String url = fullUrl;
// print("URL Query String: $url"); // print("URL Query String: $url");
// print("body: $body"); // print("body: $body");
if (await Utils.checkConnection()) { if (await Utils.checkConnection()) {
headers.addAll({'Content-Type': 'application/json', 'Accept': 'application/json'}); headers!.addAll({'Content-Type': 'application/json', 'Accept': 'application/json'});
final response = await http.post( final response = await http.post(
Uri.parse(url.trim()), Uri.parse(url.trim()),
body: json.encode(body), body: json.encode(body),
@ -564,19 +564,19 @@ class BaseAppClient {
// print(response.body.toString()); // print(response.body.toString());
if (statusCode < 200 || statusCode >= 400 || json == null) { if (statusCode < 200 || statusCode >= 400 || json == null) {
onFailure('Error While Fetching data', statusCode); onFailure!('Error While Fetching data', statusCode);
logApiFullUrlError(fullUrl, 'Error While Fetching data', statusCode); logApiFullUrlError(fullUrl, 'Error While Fetching data', statusCode);
} else { } else {
onSuccess(response.body.toString(), statusCode); onSuccess!(response.body.toString(), statusCode);
} }
} else { } else {
onFailure('Please Check The Internet Connection', -1); onFailure!('Please Check The Internet Connection', -1);
_analytics.errorTracking.log("internet_connectivity", error: "no internet available"); _analytics.errorTracking.log("internet_connectivity", error: "no internet available");
} }
} }
simpleGet(String fullUrl, simpleGet(String fullUrl,
{Function(dynamic response, int statusCode) onSuccess, Function(String error, int statusCode) onFailure, Map<String, dynamic> queryParams, Map<String, String> headers}) async { {Function(dynamic response, int statusCode)? onSuccess, Function(String error, int statusCode)? onFailure, Map<String, dynamic>? queryParams, Map<String, String>? headers}) async {
headers = headers ?? {}; headers = headers ?? {};
String url = fullUrl; String url = fullUrl;
@ -599,23 +599,23 @@ class BaseAppClient {
if (await handleUnauthorized(statusCode, forUrl: fullUrl)) simpleGet(fullUrl, onFailure: onFailure, onSuccess: onSuccess, headers: headers, queryParams: queryParams); if (await handleUnauthorized(statusCode, forUrl: fullUrl)) simpleGet(fullUrl, onFailure: onFailure, onSuccess: onSuccess, headers: headers, queryParams: queryParams);
if (statusCode < 200 || statusCode >= 400 || json == null) { if (statusCode < 200 || statusCode >= 400 || json == null) {
onFailure('Error While Fetching data', statusCode); onFailure!('Error While Fetching data', statusCode);
logApiFullUrlError(fullUrl, 'Error While Fetching data', statusCode); logApiFullUrlError(fullUrl, 'Error While Fetching data', statusCode);
} else { } else {
onSuccess(response.body.toString(), statusCode); onSuccess!(response.body.toString(), statusCode);
} }
} else { } else {
onFailure('Please Check The Internet Connection', -1); onFailure!('Please Check The Internet Connection', -1);
_analytics.errorTracking.log("internet_connectivity", error: "no internet available"); _analytics.errorTracking.log("internet_connectivity", error: "no internet available");
} }
} }
simplePut(String fullUrl, {Map<String, dynamic> body, Map<String, String> headers, Function(dynamic response, int statusCode) onSuccess, Function(String error, int statusCode) onFailure}) async { simplePut(String fullUrl, {Map<String, dynamic>? body, Map<String, String>? headers, Function(dynamic response, int statusCode)? onSuccess, Function(String error, int statusCode)? onFailure}) async {
String url = fullUrl; String url = fullUrl;
// print("URL Query String: $url"); // print("URL Query String: $url");
if (await Utils.checkConnection()) { if (await Utils.checkConnection()) {
headers.addAll({'Content-Type': 'application/json', 'Accept': 'application/json'}); headers!.addAll({'Content-Type': 'application/json', 'Accept': 'application/json'});
final response = await http.put( final response = await http.put(
Uri.parse(url.trim()), Uri.parse(url.trim()),
body: json.encode(body), body: json.encode(body),
@ -627,19 +627,19 @@ class BaseAppClient {
if (await handleUnauthorized(statusCode, forUrl: fullUrl)) simplePut(fullUrl, onFailure: onFailure, onSuccess: onSuccess, headers: headers, body: body); if (await handleUnauthorized(statusCode, forUrl: fullUrl)) simplePut(fullUrl, onFailure: onFailure, onSuccess: onSuccess, headers: headers, body: body);
if (statusCode < 200 || statusCode >= 400 || json == null) { if (statusCode < 200 || statusCode >= 400 || json == null) {
onFailure('Error While Fetching data', statusCode); onFailure!('Error While Fetching data', statusCode);
logApiFullUrlError(fullUrl, 'Error While Fetching data', statusCode); logApiFullUrlError(fullUrl, 'Error While Fetching data', statusCode);
} else { } else {
onSuccess(response.body.toString(), statusCode); onSuccess!(response.body.toString(), statusCode);
} }
} else { } else {
onFailure('Please Check The Internet Connection', -1); onFailure!('Please Check The Internet Connection', -1);
_analytics.errorTracking.log("internet_connectivity", error: "no internet available"); _analytics.errorTracking.log("internet_connectivity", error: "no internet available");
} }
} }
simpleDelete(String fullUrl, simpleDelete(String fullUrl,
{Function(dynamic response, int statusCode) onSuccess, Function(String error, int statusCode) onFailure, Map<String, String> queryParams, Map<String, String> headers}) async { {Function(dynamic response, int statusCode)? onSuccess, Function(String error, int statusCode)? onFailure, Map<String, String>? queryParams, Map<String, String>? headers}) async {
String url = fullUrl; String url = fullUrl;
// print("URL Query String: $url"); // print("URL Query String: $url");
@ -651,7 +651,7 @@ class BaseAppClient {
} }
if (await Utils.checkConnection()) { if (await Utils.checkConnection()) {
headers.addAll({'Content-Type': 'application/json', 'Accept': 'application/json'}); headers!.addAll({'Content-Type': 'application/json', 'Accept': 'application/json'});
final response = await http.delete( final response = await http.delete(
Uri.parse(url.trim()), Uri.parse(url.trim()),
headers: headers, headers: headers,
@ -662,19 +662,19 @@ class BaseAppClient {
if (await handleUnauthorized(statusCode, forUrl: fullUrl)) simpleDelete(fullUrl, onFailure: onFailure, onSuccess: onSuccess, queryParams: queryParams, headers: headers); if (await handleUnauthorized(statusCode, forUrl: fullUrl)) simpleDelete(fullUrl, onFailure: onFailure, onSuccess: onSuccess, queryParams: queryParams, headers: headers);
if (statusCode < 200 || statusCode >= 400 || json == null) { if (statusCode < 200 || statusCode >= 400 || json == null) {
onFailure('Error While Fetching data', statusCode); onFailure!('Error While Fetching data', statusCode);
logApiFullUrlError(fullUrl, 'Error While Fetching data', statusCode); logApiFullUrlError(fullUrl, 'Error While Fetching data', statusCode);
} else { } else {
onSuccess(response.body.toString(), statusCode); onSuccess!(response.body.toString(), statusCode);
} }
} else { } else {
onFailure('Please Check The Internet Connection', -1); onFailure!('Please Check The Internet Connection', -1);
_analytics.errorTracking.log("internet_connectivity", error: "no internet available"); _analytics.errorTracking.log("internet_connectivity", error: "no internet available");
} }
} }
Future<bool> handleUnauthorized(int statusCode, {String forUrl}) async { Future<bool> handleUnauthorized(int statusCode, {String? forUrl}) async {
if (forUrl.startsWith(EXA_CART_API_BASE_URL) && statusCode == 401) { if (forUrl!.startsWith(EXA_CART_API_BASE_URL) && statusCode == 401) {
final token = await generatePackagesToken(); final token = await generatePackagesToken();
packagesAuthHeader['Authorization'] = 'Bearer $token'; packagesAuthHeader['Authorization'] = 'Bearer $token';
return token != null && (token is String); return token != null && (token is String);
@ -690,7 +690,7 @@ class BaseAppClient {
var model = Provider.of<ToDoCountProviderModel>(AppGlobal.context, listen: false); var model = Provider.of<ToDoCountProviderModel>(AppGlobal.context, listen: false);
_vitalSignService.weightKg = ""; _vitalSignService.weightKg = "";
_vitalSignService.heightCm = ""; _vitalSignService.heightCm = "";
model.setState(0, false, null); model.setState(0, false, "");
Navigator.of(AppGlobal.context).pushReplacementNamed(HOME); Navigator.of(AppGlobal.context).pushReplacementNamed(HOME);
} }
@ -721,7 +721,7 @@ class BaseAppClient {
} }
pharmacyPost(String endPoint, pharmacyPost(String endPoint,
{Map<String, dynamic> body, Function(dynamic response, int statusCode) onSuccess, Function(String error, int statusCode) onFailure, bool isAllowAny = false, bool isExternal = false}) async { {Map<String, dynamic>? body, Function(dynamic response, int statusCode)? onSuccess, Function(String error, int statusCode)? onFailure, bool isAllowAny = false, bool isExternal = false}) async {
var token = await sharedPref.getString(PHARMACY_AUTORZIE_TOKEN); var token = await sharedPref.getString(PHARMACY_AUTORZIE_TOKEN);
var user = await sharedPref.getObject(USER_PROFILE); var user = await sharedPref.getObject(USER_PROFILE);
String url; String url;
@ -735,7 +735,7 @@ class BaseAppClient {
String token = await sharedPref.getString(TOKEN); String token = await sharedPref.getString(TOKEN);
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar'); var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
var user = await sharedPref.getObject(USER_PROFILE); var user = await sharedPref.getObject(USER_PROFILE);
if (body.containsKey('SetupID')) { if (body!.containsKey('SetupID')) {
body['SetupID'] = body.containsKey('SetupID') body['SetupID'] = body.containsKey('SetupID')
? body['SetupID'] != null ? body['SetupID'] != null
? body['SetupID'] ? body['SetupID']
@ -807,48 +807,48 @@ class BaseAppClient {
// print("statusCode :$statusCode"); // print("statusCode :$statusCode");
if (statusCode < 200 || statusCode >= 400 || json == null) { if (statusCode < 200 || statusCode >= 400 || json == null) {
var parsed = json.decode(utf8.decode(response.bodyBytes)); var parsed = json.decode(utf8.decode(response.bodyBytes));
onFailure(parsed['error']['ErrorEndUserMsgN'] ?? 'Error While Fetching data', statusCode); onFailure!(parsed['error']['ErrorEndUserMsgN'] ?? 'Error While Fetching data', statusCode);
logApiEndpointError(endPoint, parsed['error']['ErrorEndUserMsgN'] ?? 'Error While Fetching data', statusCode); logApiEndpointError(endPoint, parsed['error']['ErrorEndUserMsgN'] ?? 'Error While Fetching data', statusCode);
} else { } else {
// var parsed = json.decode(response.body.toString()); // var parsed = json.decode(response.body.toString());
var parsed = json.decode(utf8.decode(response.bodyBytes)); var parsed = json.decode(utf8.decode(response.bodyBytes));
if (parsed['Response_Message'] != null) { if (parsed['Response_Message'] != null) {
onSuccess(parsed, statusCode); onSuccess!(parsed, statusCode);
} else { } else {
if (parsed['ErrorType'] == 4) { if (parsed['ErrorType'] == 4) {
navigateToAppUpdate(AppGlobal.context, parsed['ErrorEndUserMessage']); navigateToAppUpdate(AppGlobal.context, parsed['ErrorEndUserMessage']);
} }
if (isAllowAny) { if (isAllowAny) {
onSuccess(parsed, statusCode); onSuccess!(parsed, statusCode);
} else if (parsed['IsAuthenticated'] == null) { } else if (parsed['IsAuthenticated'] == null) {
if (parsed['isSMSSent'] == true) { if (parsed['isSMSSent'] == true) {
onSuccess(parsed, statusCode); onSuccess!(parsed, statusCode);
} else if (parsed['MessageStatus'] == 1) { } else if (parsed['MessageStatus'] == 1) {
onSuccess(parsed, statusCode); onSuccess!(parsed, statusCode);
} else if (parsed['Result'] == 'OK') { } else if (parsed['Result'] == 'OK') {
onSuccess(parsed, statusCode); onSuccess!(parsed, statusCode);
} else { } else {
if (parsed != null) { if (parsed != null) {
onSuccess(parsed, statusCode); onSuccess!(parsed, statusCode);
} else { } else {
onFailure(parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode); onFailure!(parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode);
logApiEndpointError(endPoint, parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode); logApiEndpointError(endPoint, parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode);
logout(); logout();
} }
} }
} else if (parsed['MessageStatus'] == 1 || parsed['SMSLoginRequired'] == true) { } else if (parsed['MessageStatus'] == 1 || parsed['SMSLoginRequired'] == true) {
onSuccess(parsed, statusCode); onSuccess!(parsed, statusCode);
} else if (parsed['MessageStatus'] == 2 && parsed['IsAuthenticated']) { } else if (parsed['MessageStatus'] == 2 && parsed['IsAuthenticated']) {
if (parsed['message'] == null && parsed['ErrorEndUserMessage'] == null) { if (parsed['message'] == null && parsed['ErrorEndUserMessage'] == null) {
if (parsed['ErrorSearchMsg'] == null) { if (parsed['ErrorSearchMsg'] == null) {
onFailure("Server Error found with no available message", statusCode); onFailure!("Server Error found with no available message", statusCode);
logApiEndpointError(endPoint, "Server Error found with no available message", statusCode); logApiEndpointError(endPoint, "Server Error found with no available message", statusCode);
} else { } else {
onFailure(parsed['ErrorSearchMsg'], statusCode); onFailure!(parsed['ErrorSearchMsg'], statusCode);
logApiEndpointError(endPoint, parsed['ErrorSearchMsg'], statusCode); logApiEndpointError(endPoint, parsed['ErrorSearchMsg'], statusCode);
} }
} else { } else {
onFailure(parsed['message'] ?? parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode); onFailure!(parsed['message'] ?? parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode);
logApiEndpointError(endPoint, parsed['message'] ?? parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode); logApiEndpointError(endPoint, parsed['message'] ?? parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode);
} }
} else if (!parsed['IsAuthenticated']) { } else if (!parsed['IsAuthenticated']) {
@ -857,13 +857,13 @@ class BaseAppClient {
//helpers.showErrorToast('Your session expired Please login agian'); //helpers.showErrorToast('Your session expired Please login agian');
} else { } else {
if (parsed['SameClinicApptList'] != null) { if (parsed['SameClinicApptList'] != null) {
onSuccess(parsed, statusCode); onSuccess!(parsed, statusCode);
} else { } else {
if (parsed['message'] != null) { if (parsed['message'] != null) {
onFailure(parsed['message'] ?? parsed['message'], statusCode); onFailure!(parsed['message'] ?? parsed['message'], statusCode);
logApiEndpointError(endPoint, parsed['message'] ?? parsed['message'], statusCode); logApiEndpointError(endPoint, parsed['message'] ?? parsed['message'], statusCode);
} else { } else {
onFailure(parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode); onFailure!(parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode);
logApiEndpointError(endPoint, parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode); logApiEndpointError(endPoint, parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode);
} }
} }
@ -871,12 +871,12 @@ class BaseAppClient {
} }
} }
} else { } else {
onFailure('Please Check The Internet Connection', -1); onFailure!('Please Check The Internet Connection', -1);
_analytics.errorTracking.log("internet_connectivity", error: "no internet available"); _analytics.errorTracking.log("internet_connectivity", error: "no internet available");
} }
} catch (e) { } catch (e) {
print(e); print(e);
onFailure(e.toString(), -1); onFailure!(e.toString(), -1);
logApiEndpointError(endPoint, e.toString(), -1); logApiEndpointError(endPoint, e.toString(), -1);
} }
} }
@ -886,7 +886,7 @@ class BaseAppClient {
var body = { var body = {
"api_client": {"client_id": "a4ab6be4-424f-4836-b032-46caed88e184", "client_secret": "3c1a3e07-4a40-4510-9fb0-ee5f0a72752c"} "api_client": {"client_id": "a4ab6be4-424f-4836-b032-46caed88e184", "client_secret": "3c1a3e07-4a40-4510-9fb0-ee5f0a72752c"}
}; };
String token; String? token;
final completer = Completer(); final completer = Completer();
simplePost(url, body: body, headers: {}, onSuccess: (dynamic stringResponse, int statusCode) { simplePost(url, body: body, headers: {}, onSuccess: (dynamic stringResponse, int statusCode) {
if (statusCode == 200) { if (statusCode == 200) {
@ -899,7 +899,7 @@ class BaseAppClient {
logApiFullUrlError(url, error, statusCode); logApiFullUrlError(url, error, statusCode);
}); });
await completer.future; await completer.future;
return token; return token!;
} }
logApiFullUrlError(String fullUrl, error, code) { logApiFullUrlError(String fullUrl, error, code) {

@ -7,9 +7,9 @@ import '../base_service.dart';
class FindusService extends BaseService { class FindusService extends BaseService {
List<GetHMGLocationsModel> FindusModelList = List(); List<GetHMGLocationsModel> FindusModelList =[];
List<GetHMGLocationsModel> FindusHospitalModelList = List(); List<GetHMGLocationsModel> FindusHospitalModelList =[];
List<GetHMGLocationsModel> FindusPharmaciesModelList = List(); List<GetHMGLocationsModel> FindusPharmaciesModelList =[];
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();
Future getAllFindUsOrders() async { Future getAllFindUsOrders() async {

@ -5,7 +5,7 @@ import 'package:diplomaticquarterapp/core/model/contactus/get_patientI_cprojects
import '../base_service.dart'; import '../base_service.dart';
class LiveChatService extends BaseService { class LiveChatService extends BaseService {
List<GetPatientICProjectsModel> LivechatModelList = List(); List<GetPatientICProjectsModel> LivechatModelList =[];
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();
// body['body'] // body['body']

@ -7,8 +7,8 @@ import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
class EdOnlineServices extends BaseService { class EdOnlineServices extends BaseService {
List<TriageQuestionsModel> triageQuestionsModelList = List(); List<TriageQuestionsModel> triageQuestionsModelList =[];
ErPatientShareModel erPatientShareModel; ErPatientShareModel? erPatientShareModel;
Future getQuestions() async { Future getQuestions() async {
hasError = false; hasError = false;
@ -36,25 +36,25 @@ class EdOnlineServices extends BaseService {
}, body: Map.from({"ProjectID": 15, "ClinicID": 10})); }, body: Map.from({"ProjectID": 15, "ClinicID": 10}));
} }
Future saveQuestionsInformation({String notes, String chiefComplaint, int projectId, DateTime selectedTime, List<TriageQuestionsModel> selectedQuestions}) async { Future saveQuestionsInformation({String? notes, String? chiefComplaint, int? projectId, DateTime? selectedTime, List<TriageQuestionsModel>? selectedQuestions}) async {
AppSharedPreferences sharedPref = AppSharedPreferences(); AppSharedPreferences sharedPref = AppSharedPreferences();
hasError = false; hasError = false;
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();
List<Map> checklist = List(); List<Map> checklist =[];
body['ProjectID'] = 15; body['ProjectID'] = 15;
body['ProjectId'] = projectId; body['ProjectId'] = projectId;
int riskScore = 0; int riskScore = 0;
if (user.age > 14) { if (user.age > 14) {
selectedQuestions.forEach((element) { selectedQuestions!.forEach((element) {
int score = int.parse((element.adultPoints != "" ? element.adultPoints : "0")); int score = int.parse((element.adultPoints! != "" ? element.adultPoints! : "0"));
riskScore += score; riskScore += score;
checklist.add(Map.from({"IsSelected": 1, "ParameterCode": element.parameterCode, "ParameterGroup": element.parameterGroup, "ParameterType": element.parameterType, "Score": score})); checklist.add(Map.from({"IsSelected": 1, "ParameterCode": element.parameterCode, "ParameterGroup": element.parameterGroup, "ParameterType": element.parameterType, "Score": score}));
}); });
} else { } else {
selectedQuestions.forEach((element) { selectedQuestions!.forEach((element) {
int score = int.parse(element.pediaPoints); int score = int.parse(element.pediaPoints!);
riskScore += score; riskScore += score;
checklist.add(Map.from({"IsSelected": 1, "ParameterCode": element.parameterCode, "ParameterGroup": element.parameterGroup, "ParameterType": element.parameterType, "Score": score})); checklist.add(Map.from({"IsSelected": 1, "ParameterCode": element.parameterCode, "ParameterGroup": element.parameterGroup, "ParameterType": element.parameterType, "Score": score}));
}); });

@ -10,18 +10,18 @@ import 'package:flutter/cupertino.dart';
import '../base_service.dart'; import '../base_service.dart';
class AmService extends BaseService { class AmService extends BaseService {
List<PatientERTransportationMethod> amModelList = List(); List<PatientERTransportationMethod> amModelList =[];
List<PatientAllPresOrders> patientAllPresOrdersList = List(); List<PatientAllPresOrders> patientAllPresOrdersList =[];
List<AmbulanceRequestOrdersModel> patientAmbulanceRequestOrdersList = List(); List<AmbulanceRequestOrdersModel> patientAmbulanceRequestOrdersList =[];
bool hasPendingOrder = false; bool hasPendingOrder = false;
int pendingOrderID = 0; int pendingOrderID = 0;
String pendingOrderStatus = ""; String pendingOrderStatus = "";
String pendingOrderStatusAR = ""; String pendingOrderStatusAR = "";
PickUpRequestPresOrder pickUpRequestPresOrder; PickUpRequestPresOrder? pickUpRequestPresOrder;
AmbulanceRequestOrdersModel pendingAmbulanceRequestOrder; AmbulanceRequestOrdersModel? pendingAmbulanceRequestOrder;
Future getAllTransportationOrders() async { Future getAllTransportationOrders() async {
hasError = false; hasError = false;
@ -51,9 +51,9 @@ class AmService extends BaseService {
patientAllPresOrdersList.add(order); patientAllPresOrdersList.add(order);
if (order.status == 1) { if (order.status == 1) {
hasPendingOrder = true; hasPendingOrder = true;
pendingOrderID = order.iD; pendingOrderID = order.iD!;
pendingOrderStatus = order.description; pendingOrderStatus = order.description!;
pendingOrderStatusAR = order.descriptionN; pendingOrderStatusAR = order.descriptionN!;
} }
} }
}); });
@ -109,7 +109,7 @@ class AmService extends BaseService {
}, body: body); }, body: body);
} }
Future updatePressOrder({@required int presOrderID}) async { Future updatePressOrder({required int presOrderID}) async {
hasError = false; hasError = false;
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();
body['PresOrderID'] = presOrderID; body['PresOrderID'] = presOrderID;
@ -123,7 +123,7 @@ class AmService extends BaseService {
}, body: body); }, body: body);
} }
Future updatePressOrderRC({@required int presOrderID, @required int patientID}) async { Future updatePressOrderRC({required int presOrderID, required int patientID}) async {
hasError = false; hasError = false;
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();
body['Id'] = presOrderID; body['Id'] = presOrderID;
@ -136,7 +136,7 @@ class AmService extends BaseService {
}, body: body); }, body: body);
} }
Future insertERPressOrder({@required PatientER_RC patientER}) async { Future insertERPressOrder({required PatientER_RC patientER}) async {
hasError = false; hasError = false;
var body = patientER.toJson(); var body = patientER.toJson();
await baseAppClient.post(INSERT_TRANSPORTATION_ORDER_RC, isRCService: true, onSuccess: (dynamic response, int statusCode) {}, onFailure: (String error, int statusCode) { await baseAppClient.post(INSERT_TRANSPORTATION_ORDER_RC, isRCService: true, onSuccess: (dynamic response, int statusCode) {}, onFailure: (String error, int statusCode) {

@ -5,11 +5,11 @@ import 'package:diplomaticquarterapp/core/model/er/projectavgerwaitingtime.dart'
import '../base_service.dart'; import '../base_service.dart';
class ErService extends BaseService { class ErService extends BaseService {
List<ProjectAvgERWaitingTime> projectAvgERWaitingTimeModelList = List(); List<ProjectAvgERWaitingTime> projectAvgERWaitingTimeModelList =[];
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();
Future getProjectAvgERWaitingTimeOrders({int id, int projectID}) async { Future getProjectAvgERWaitingTimeOrders({int? id, int? projectID}) async {
hasError = false; hasError = false;
if (id != null && projectID != null) { if (id != null && projectID != null) {

@ -9,11 +9,11 @@ import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResu
import 'package:diplomaticquarterapp/uitl/utils.dart'; import 'package:diplomaticquarterapp/uitl/utils.dart';
class FeedbackService extends BaseService { class FeedbackService extends BaseService {
List<COCItem> cOCItemList = List(); List<COCItem> cOCItemList =[];
RequestInsertCOCItem _requestInsertCOCItem = RequestInsertCOCItem(); RequestInsertCOCItem _requestInsertCOCItem = RequestInsertCOCItem();
List<AppoitmentAllHistoryResultList> appointHistoryList = List(); List<AppoitmentAllHistoryResultList> appointHistoryList =[];
Future sendCOCItem({String title, String details, String cOCTypeName, String attachment, AppoitmentAllHistoryResultList appointHistory}) async { Future sendCOCItem({String? title, String? details, String? cOCTypeName, String? attachment, AppoitmentAllHistoryResultList? appointHistory}) async {
hasError = false; hasError = false;
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar'); var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');

@ -11,7 +11,7 @@ import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:flutter/foundation.dart'; import 'package:flutter/foundation.dart';
class GeofencingServices extends BaseService { class GeofencingServices extends BaseService {
List<GeoZonesResponseModel> geoZones = List(); List<GeoZonesResponseModel> geoZones =[];
bool testZones = true; bool testZones = true;
Future<List<GeoZonesResponseModel>> getAllGeoZones(GeoZonesRequestModel request) async { Future<List<GeoZonesResponseModel>> getAllGeoZones(GeoZonesRequestModel request) async {
@ -37,7 +37,7 @@ class GeofencingServices extends BaseService {
return geoZones; return geoZones;
} }
LogGeoZoneResponseModel logResponse; LogGeoZoneResponseModel? logResponse;
Future<LogGeoZoneResponseModel> logGeoZone(LogGeoZoneRequestModel request) async { Future<LogGeoZoneResponseModel> logGeoZone(LogGeoZoneRequestModel request) async {
hasError = false; hasError = false;
@ -47,6 +47,6 @@ class GeofencingServices extends BaseService {
hasError = true; hasError = true;
return Future.error(error); return Future.error(error);
}, body: request.toFlatMap()); }, body: request.toFlatMap());
return logResponse; return logResponse!;
} }
} }

@ -9,20 +9,19 @@ import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart'; import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:geolocator/geolocator.dart'; import 'package:geolocator/geolocator.dart';
import 'package:progress_hud_v2/generated/i18n.dart';
class HospitalService extends BaseService { class HospitalService extends BaseService {
List<HospitalsModel> _hospitals = List(); List<HospitalsModel> _hospitals =[];
List<HospitalsModel> get hospitals => _hospitals; List<HospitalsModel> get hospitals => _hospitals;
double _latitude; double? _latitude;
double _longitude; double? _longitude;
_getCurrentLocation() async { _getCurrentLocation() async {
if (await PermissionService.isLocationEnabled()) { if (await PermissionService.isLocationEnabled()) {
Geolocator.getLastKnownPosition().then((value) { Geolocator.getLastKnownPosition().then((value) {
_latitude = value.latitude; _latitude = value!.latitude;
_longitude = value.longitude; _longitude = value.longitude;
}).catchError((e) { }).catchError((e) {
_longitude = 0; _longitude = 0;
@ -32,7 +31,7 @@ class HospitalService extends BaseService {
if (Platform.isAndroid) { if (Platform.isAndroid) {
Utils.showPermissionConsentDialog(AppGlobal.context, TranslationBase.of(AppGlobal.context).locationPermissionDialog, () { Utils.showPermissionConsentDialog(AppGlobal.context, TranslationBase.of(AppGlobal.context).locationPermissionDialog, () {
Geolocator.getLastKnownPosition().then((value) { Geolocator.getLastKnownPosition().then((value) {
_latitude = value.latitude; _latitude = value!.latitude;
_longitude = value.longitude; _longitude = value.longitude;
}).catchError((e) { }).catchError((e) {
_longitude = 0; _longitude = 0;
@ -41,7 +40,7 @@ class HospitalService extends BaseService {
}); });
} else { } else {
Geolocator.getLastKnownPosition().then((value) { Geolocator.getLastKnownPosition().then((value) {
_latitude = value.latitude; _latitude = value!.latitude;
_longitude = value.longitude; _longitude = value.longitude;
}).catchError((e) { }).catchError((e) {
_longitude = 0; _longitude = 0;

@ -15,9 +15,9 @@ import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
class InsuranceCardService extends BaseService { class InsuranceCardService extends BaseService {
List<InsuranceCardModel> _cardList = List(); List<InsuranceCardModel> _cardList =[];
List<InsuranceUpdateModel> _cardUpdated = List(); List<InsuranceUpdateModel> _cardUpdated =[];
List<InsuranceApprovalModel> _insuranceApproval = List(); List<InsuranceApprovalModel> _insuranceApproval =[];
List<InsuranceCardModel> get cardList => _cardList; List<InsuranceCardModel> get cardList => _cardList;
@ -25,8 +25,8 @@ class InsuranceCardService extends BaseService {
List<InsuranceApprovalModel> get insuranceApproval => _insuranceApproval; List<InsuranceApprovalModel> get insuranceApproval => _insuranceApproval;
InsuranceCardDetailsModel insuranceCardDetails; InsuranceCardDetailsModel? insuranceCardDetails;
List<InsuranceCardDetailsModel> insuranceCardDetailsList = List(); List<InsuranceCardDetailsModel> insuranceCardDetailsList =[];
bool isHaveInsuranceCard = false; bool isHaveInsuranceCard = false;
GetAllSharedRecordsByStatusResponse getAllSharedRecordsByStatusResponse = GetAllSharedRecordsByStatusResponse(); GetAllSharedRecordsByStatusResponse getAllSharedRecordsByStatusResponse = GetAllSharedRecordsByStatusResponse();
@ -68,7 +68,7 @@ class InsuranceCardService extends BaseService {
}, body: Map()); }, body: Map());
} }
Future getInsuranceApproval({int appointmentNo}) async { Future getInsuranceApproval({required int appointmentNo}) async {
hasError = false; hasError = false;
if (appointmentNo != null) { if (appointmentNo != null) {
_requestInsuranceApprovalModel.appointmentNo = appointmentNo; _requestInsuranceApprovalModel.appointmentNo = appointmentNo;
@ -142,7 +142,7 @@ class InsuranceCardService extends BaseService {
return Future.value(localRes); return Future.value(localRes);
} }
Future getPatientInsuranceDetails({String setupID, int projectID, String patientIdentificationID, int patientID, bool isFamily, int parentID = 0}) async { Future getPatientInsuranceDetails({String? setupID, int? projectID, String? patientIdentificationID, int? patientID, bool? isFamily, int parentID = 0}) async {
error = ""; error = "";
hasError = false; hasError = false;
insuranceCardDetails = null; insuranceCardDetails = null;
@ -220,7 +220,7 @@ class InsuranceCardService extends BaseService {
return Future.value(localRes); return Future.value(localRes);
} }
Future uploadInsuranceCard(BuildContext context, {String patientIdentificationID, int patientID, String image = ""}) async { Future uploadInsuranceCard(BuildContext context, {String? patientIdentificationID, int? patientID, String image = ""}) async {
error = ""; error = "";
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();
body['PatientID'] = patientID; body['PatientID'] = patientID;

@ -4,7 +4,7 @@ import 'package:diplomaticquarterapp/core/service/base_service.dart';
class ActiveMedicationsService extends BaseService{ class ActiveMedicationsService extends BaseService{
List<ActivePrescriptionReport> activePrescriptionReport = List(); List<ActivePrescriptionReport> activePrescriptionReport =[];
getActiveMedication() async { getActiveMedication() async {
hasError = false; hasError = false;

@ -3,7 +3,7 @@ import 'package:diplomaticquarterapp/core/model/Allergy/Allergy.dart';
import 'package:diplomaticquarterapp/core/service/base_service.dart'; import 'package:diplomaticquarterapp/core/service/base_service.dart';
class AllergiesService extends BaseService { class AllergiesService extends BaseService {
List<Allergy> allergies = List(); List<Allergy> allergies =[];
getAllergies() async { getAllergies() async {
hasError = false; hasError = false;

@ -6,14 +6,14 @@ import 'package:diplomaticquarterapp/core/model/my_trakers/blood_pressur/YearBlo
import 'package:diplomaticquarterapp/core/service/base_service.dart'; import 'package:diplomaticquarterapp/core/service/base_service.dart';
class BloodPressureService extends BaseService { class BloodPressureService extends BaseService {
List<MonthBloodPressureResultAverage> monthDiabtectResultAverageList = List(); List<MonthBloodPressureResultAverage> monthDiabtectResultAverageList =[];
List<WeekBloodPressureResultAverage> weekDiabtectResultAverageList = List(); List<WeekBloodPressureResultAverage> weekDiabtectResultAverageList =[];
List<YearBloodPressureResultAverage> yearDiabtecResultAverageList = List(); List<YearBloodPressureResultAverage> yearDiabtecResultAverageList =[];
///Result ///Result
List<BloodPressureResult> monthDiabtecPatientResult = List(); List<BloodPressureResult> monthDiabtecPatientResult =[];
List<BloodPressureResult> weekDiabtecPatientResult = List(); List<BloodPressureResult> weekDiabtecPatientResult =[];
List<BloodPressureResult> yearDiabtecPatientResult = List(); List<BloodPressureResult> yearDiabtecPatientResult =[];
Future getBloodSugar() async { Future getBloodSugar() async {
hasError = false; hasError = false;
@ -84,10 +84,10 @@ class BloodPressureService extends BaseService {
} }
addDiabtecResult( addDiabtecResult(
{String bloodPressureDate, {String? bloodPressureDate,
String diastolicPressure, String? diastolicPressure,
String systolicePressure, String? systolicePressure,
int measuredArm}) async { int? measuredArm}) async {
hasError = false; hasError = false;
super.error = ""; super.error = "";
@ -109,11 +109,11 @@ class BloodPressureService extends BaseService {
} }
updateDiabtecResult( updateDiabtecResult(
{String bloodPressureDate, {String? bloodPressureDate,
String diastolicPressure, String? diastolicPressure,
String systolicePressure, String? systolicePressure,
int lineItemNo, int? lineItemNo,
int measuredArm}) async { int? measuredArm}) async {
hasError = false; hasError = false;
super.error = ""; super.error = "";
@ -135,7 +135,7 @@ class BloodPressureService extends BaseService {
}, body: body); }, body: body);
} }
Future deactivateDiabeticStatus({int lineItemNo }) async { Future deactivateDiabeticStatus({int? lineItemNo }) async {
hasError = false; hasError = false;
super.error = ""; super.error = "";
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();

@ -6,14 +6,14 @@ import 'package:diplomaticquarterapp/core/model/my_trakers/blood_sugar/YearDiabt
import 'package:diplomaticquarterapp/core/service/base_service.dart'; import 'package:diplomaticquarterapp/core/service/base_service.dart';
class BloodSugarService extends BaseService { class BloodSugarService extends BaseService {
List<MonthDiabtectResultAverage> monthDiabtectResultAverageList = List(); List<MonthDiabtectResultAverage> monthDiabtectResultAverageList =[];
List<WeekDiabtectResultAverage> weekDiabtectResultAverageList = List(); List<WeekDiabtectResultAverage> weekDiabtectResultAverageList =[];
List<YearDiabtecResultAverage> yearDiabtecResultAverageList = List(); List<YearDiabtecResultAverage> yearDiabtecResultAverageList =[];
///Result ///Result
List<DiabtecPatientResult> monthDiabtecPatientResult = List(); List<DiabtecPatientResult> monthDiabtecPatientResult =[];
List<DiabtecPatientResult> weekDiabtecPatientResult = List(); List<DiabtecPatientResult> weekDiabtecPatientResult =[];
List<DiabtecPatientResult> yearDiabtecPatientResult = List(); List<DiabtecPatientResult> yearDiabtecPatientResult =[];
Future getBloodSugar() async { Future getBloodSugar() async {
hasError = false; hasError = false;
@ -67,14 +67,14 @@ class BloodSugarService extends BaseService {
}, body: Map()); }, body: Map());
} }
addDiabtecResult({String bloodSugerDateChart, String bloodSugerResult, String diabtecUnit, int measuredTime}) async { addDiabtecResult({String? bloodSugerDateChart, String? bloodSugerResult, String? diabtecUnit, int? measuredTime}) async {
hasError = false; hasError = false;
super.error = ""; super.error = "";
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();
body['BloodSugerDateChart'] = bloodSugerDateChart; body['BloodSugerDateChart'] = bloodSugerDateChart;
body['BloodSugerResult'] = bloodSugerResult; body['BloodSugerResult'] = bloodSugerResult;
body['DiabtecUnit'] = diabtecUnit; body['DiabtecUnit'] = diabtecUnit;
body['MeasuredTime'] = measuredTime + 1; body['MeasuredTime'] = measuredTime! + 1;
body['isDentalAllowedBackend'] = false; body['isDentalAllowedBackend'] = false;
await baseAppClient.post(ADD_DIABTEC_RESULT, onSuccess: (response, statusCode) async {}, onFailure: (String error, int statusCode) { await baseAppClient.post(ADD_DIABTEC_RESULT, onSuccess: (response, statusCode) async {}, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
@ -82,15 +82,15 @@ class BloodSugarService extends BaseService {
}, body: body); }, body: body);
} }
updateDiabtecResult({DateTime month, DateTime hour, String bloodSugerResult, String diabtecUnit, int measuredTime, int lineItemNo}) async { updateDiabtecResult({DateTime? month, DateTime? hour, String? bloodSugerResult, String? diabtecUnit, int? measuredTime, int? lineItemNo}) async {
hasError = false; hasError = false;
super.error = ""; super.error = "";
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();
body['BloodSugerResult'] = bloodSugerResult; body['BloodSugerResult'] = bloodSugerResult;
body['DiabtecUnit'] = diabtecUnit; body['DiabtecUnit'] = diabtecUnit;
body['BloodSugerDateChart'] = '${month.year}-${month.month}-${month.day} ${hour.hour}:${hour.minute}:00'; body['BloodSugerDateChart'] = '${month!.year}-${month.month}-${month.day} ${hour!.hour}:${hour.minute}:00';
body['isDentalAllowedBackend'] = false; body['isDentalAllowedBackend'] = false;
body['MeasuredTime'] = measuredTime + 1; body['MeasuredTime'] = measuredTime! + 1;
body['LineItemNo'] = lineItemNo; body['LineItemNo'] = lineItemNo;
await baseAppClient.post(UPDATE_DIABETIC_RESULT, onSuccess: (response, statusCode) async {}, onFailure: (String error, int statusCode) { await baseAppClient.post(UPDATE_DIABETIC_RESULT, onSuccess: (response, statusCode) async {}, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
@ -110,7 +110,7 @@ class BloodSugarService extends BaseService {
}, body: body); }, body: body);
} }
Future deactivateDiabeticStatus({int lineItemNo}) async { Future deactivateDiabeticStatus({int? lineItemNo}) async {
hasError = false; hasError = false;
super.error = ""; super.error = "";
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();

@ -4,7 +4,7 @@ import 'package:diplomaticquarterapp/core/service/base_service.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart'; import 'package:diplomaticquarterapp/uitl/utils.dart';
class EyeService extends BaseService { class EyeService extends BaseService {
List<AppoimentAllHistoryResultList> appoimentAllHistoryResultList = List(); List<AppoimentAllHistoryResultList> appoimentAllHistoryResultList = [];
getEyeMeasurement() async { getEyeMeasurement() async {
hasError = false; hasError = false;
@ -12,12 +12,10 @@ class EyeService extends BaseService {
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();
body['isDentalAllowedBackend'] = false; body['isDentalAllowedBackend'] = false;
body['IsIrisPrescription'] = true; body['IsIrisPrescription'] = true;
await baseAppClient.post(GET_PATIENT_APPOINTMENT_HISTORY, await baseAppClient.post(GET_PATIENT_APPOINTMENT_HISTORY, onSuccess: (response, statusCode) async {
onSuccess: (response, statusCode) async {
appoimentAllHistoryResultList.clear(); appoimentAllHistoryResultList.clear();
response['AppoimentAllHistoryResultList'].forEach((appoitment) { response['AppoimentAllHistoryResultList'].forEach((appoitment) {
appoimentAllHistoryResultList appoimentAllHistoryResultList.add(AppoimentAllHistoryResultList.fromJson(appoitment));
.add(AppoimentAllHistoryResultList.fromJson(appoitment));
}); });
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
@ -25,13 +23,13 @@ class EyeService extends BaseService {
}, body: body); }, body: body);
} }
sendGlassesPrescriptionEmail({int appointmentNo,String projectName,int projectID}) async { sendGlassesPrescriptionEmail({int? appointmentNo, String? projectName, int? projectID}) async {
hasError = false; hasError = false;
super.error = ""; super.error = "";
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();
body['isDentalAllowedBackend'] = false; body['isDentalAllowedBackend'] = false;
body['PatientIditificationNum'] = user.patientIdentificationNo; body['PatientIditificationNum'] = user.patientIdentificationNo;
body['PatientName'] = user.firstName+" "+user.lastName; body['PatientName'] = user.firstName + " " + user.lastName;
body['To'] = user.emailAddress; body['To'] = user.emailAddress;
body['SetupID'] = user.setupID; body['SetupID'] = user.setupID;
body['DateofBirth'] = user.dateofBirth; body['DateofBirth'] = user.dateofBirth;
@ -40,23 +38,20 @@ class EyeService extends BaseService {
body['ProjectName'] = projectName; body['ProjectName'] = projectName;
body['PatientID'] = user.patientID; body['PatientID'] = user.patientID;
body['PatientMobileNumber'] = Utils.getPhoneNumberWithoutZero(user.mobileNumber); body['PatientMobileNumber'] = Utils.getPhoneNumberWithoutZero(user.mobileNumber);
await baseAppClient.post(SEND_REPORT_EYE_EMAIL, await baseAppClient.post(SEND_REPORT_EYE_EMAIL, onSuccess: (response, statusCode) async {}, onFailure: (String error, int statusCode) {
onSuccess: (response, statusCode) async { hasError = true;
super.error = error;
}, onFailure: (String error, int statusCode) { }, body: body);
hasError = true;
super.error = error;
}, body: body);
} }
sendContactLensPrescriptionEmail({int appointmentNo,String projectName,int projectID}) async { sendContactLensPrescriptionEmail({int? appointmentNo, String? projectName, int? projectID}) async {
hasError = false; hasError = false;
super.error = ""; super.error = "";
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();
body['isDentalAllowedBackend'] = false; body['isDentalAllowedBackend'] = false;
body['AppointmentNo'] = appointmentNo; body['AppointmentNo'] = appointmentNo;
body['PatientIditificationNum'] = user.patientIdentificationNo; body['PatientIditificationNum'] = user.patientIdentificationNo;
body['PatientName'] = user.firstName+" "+user.lastName; body['PatientName'] = user.firstName + " " + user.lastName;
body['To'] = user.emailAddress; body['To'] = user.emailAddress;
body['SetupID'] = user.setupID; body['SetupID'] = user.setupID;
body['DateofBirth'] = user.dateofBirth; body['DateofBirth'] = user.dateofBirth;
@ -65,12 +60,9 @@ class EyeService extends BaseService {
body['ProjectName'] = projectName; body['ProjectName'] = projectName;
body['PatientID'] = user.patientID; body['PatientID'] = user.patientID;
body['PatientMobileNumber'] = Utils.getPhoneNumberWithoutZero(user.mobileNumber); body['PatientMobileNumber'] = Utils.getPhoneNumberWithoutZero(user.mobileNumber);
await baseAppClient.post(SEND_CONTACT_LENS_PRESCRIPTION_EMAIL, await baseAppClient.post(SEND_CONTACT_LENS_PRESCRIPTION_EMAIL, onSuccess: (response, statusCode) async {}, onFailure: (String error, int statusCode) {
onSuccess: (response, statusCode) async { hasError = true;
super.error = error;
}, onFailure: (String error, int statusCode) { }, body: body);
hasError = true;
super.error = error;
}, body: body);
} }
} }

@ -3,7 +3,7 @@ import 'package:diplomaticquarterapp/core/model/sick_leave/sick_leave.dart';
import 'package:diplomaticquarterapp/core/service/base_service.dart'; import 'package:diplomaticquarterapp/core/service/base_service.dart';
class PatientSickLeaveService extends BaseService { class PatientSickLeaveService extends BaseService {
List<SickLeave> sickLeaveList = List(); List<SickLeave> sickLeaveList =[];
getSickLeave() async { getSickLeave() async {
hasError = false; hasError = false;
@ -21,11 +21,11 @@ class PatientSickLeaveService extends BaseService {
} }
sendSickLeaveEmail( sendSickLeaveEmail(
{int requestNo, {required int requestNo,
String projectName, required String projectName,
String doctorName, required String doctorName,
int projectID, required int projectID,
String setupID}) async { required String setupID}) async {
hasError = false; hasError = false;
super.error = ""; super.error = "";
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();

@ -7,14 +7,14 @@ import 'package:diplomaticquarterapp/core/service/base_service.dart';
class WeightService extends BaseService { class WeightService extends BaseService {
///Average ///Average
List<MonthWeightMeasurementResultAverage> monthWeightMeasurementResultAverage = List(); List<MonthWeightMeasurementResultAverage> monthWeightMeasurementResultAverage =[];
List<WeekWeightMeasurementResultAverage> weekWeightMeasurementResultAverage = List(); List<WeekWeightMeasurementResultAverage> weekWeightMeasurementResultAverage =[];
List<YearWeightMeasurementResultAverage> yearWeightMeasurementResultAverage = List(); List<YearWeightMeasurementResultAverage> yearWeightMeasurementResultAverage =[];
///Result ///Result
List<WeightMeasurementResult> monthWeightMeasurementResult = List(); List<WeightMeasurementResult> monthWeightMeasurementResult =[];
List<WeightMeasurementResult> weekWeightMeasurementResult = List(); List<WeightMeasurementResult> weekWeightMeasurementResult =[];
List<WeightMeasurementResult> yearWeightMeasurementResult = List(); List<WeightMeasurementResult> yearWeightMeasurementResult =[];
Future getWeightAverage() async { Future getWeightAverage() async {
hasError = false; hasError = false;
@ -65,7 +65,7 @@ class WeightService extends BaseService {
}, body: Map()); }, body: Map());
} }
addWeightResult({String weightDate, String weightMeasured, int weightUnit}) async { addWeightResult({required String weightDate, required String weightMeasured, required int weightUnit}) async {
hasError = false; hasError = false;
super.error = ""; super.error = "";
@ -82,7 +82,7 @@ class WeightService extends BaseService {
}, body: body); }, body: body);
} }
updateWeightResult({int lineItemNo, int weightUnit, String weightMeasured, String weightDate}) async { updateWeightResult({required int lineItemNo, required int weightUnit, required String weightMeasured, required String weightDate}) async {
hasError = false; hasError = false;
super.error = ""; super.error = "";
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();
@ -113,7 +113,7 @@ class WeightService extends BaseService {
} }
deleteWeightResult({ deleteWeightResult({
int lineItemNo, required int lineItemNo,
}) async { }) async {
hasError = false; hasError = false;
super.error = ""; super.error = "";

@ -8,10 +8,10 @@ import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart
import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
class AskDoctorService extends BaseService { class AskDoctorService extends BaseService {
List<AskDoctorReqTypes> askDoctorReqTypes = List(); List<AskDoctorReqTypes> askDoctorReqTypes =[];
List<DoctorResponse> doctorResponseList = List(); List<DoctorResponse> doctorResponseList =[];
Future getCallInfoHoursResult({int projectId, int doctorId}) async { Future getCallInfoHoursResult({int? projectId, int? doctorId}) async {
hasError = false; hasError = false;
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();
body['isDentalAllowedBackend'] = false; body['isDentalAllowedBackend'] = false;
@ -76,7 +76,7 @@ class AskDoctorService extends BaseService {
}, body: body); }, body: body);
} }
Future updateReadStatus({int transactionNo}) async { Future updateReadStatus({int? transactionNo}) async {
hasError = false; hasError = false;
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();
body['isDentalAllowedBackend'] = false; body['isDentalAllowedBackend'] = false;
@ -89,10 +89,10 @@ class AskDoctorService extends BaseService {
}, body: body); }, body: body);
} }
Future sendRequestLOV({DoctorList doctorList, String requestType, String remark}) async { Future sendRequestLOV({DoctorList? doctorList, String? requestType, String? remark}) async {
hasError = false; hasError = false;
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();
body['ProjectID'] = doctorList.projectID; body['ProjectID'] = doctorList!.projectID;
body['SetupID'] = doctorList.setupID; body['SetupID'] = doctorList.setupID;
body['DoctorID'] = doctorList.doctorID; body['DoctorID'] = doctorList.doctorID;
body['PatientMobileNumber'] = user.mobileNumber; body['PatientMobileNumber'] = user.mobileNumber;
@ -108,7 +108,7 @@ class AskDoctorService extends BaseService {
body['isDentalAllowedBackend'] = false; body['isDentalAllowedBackend'] = false;
body['AppointmentNo'] = doctorList.appointmentNo; body['AppointmentNo'] = doctorList.appointmentNo;
body['ClinicID'] = doctorList.clinicID; body['ClinicID'] = doctorList.clinicID;
body['QuestionType'] = num.parse(requestType); body['QuestionType'] = num.parse(requestType!);
body['RequestType'] = num.parse(requestType); body['RequestType'] = num.parse(requestType);
body['RequestTypeID'] = num.parse(requestType); body['RequestTypeID'] = num.parse(requestType);
@ -118,7 +118,7 @@ class AskDoctorService extends BaseService {
}, body: body); }, body: body);
} }
Future rateDoctorResponse({int transactionNo, int questionType, int rate, String notes, String mobileNo, String idNo, String patientName, int projectID, String language}) async { Future rateDoctorResponse({int? transactionNo, int? questionType, int? rate, String? notes, String? mobileNo, String? idNo, String? patientName, int? projectID, String? language}) async {
hasError = false; hasError = false;
dynamic localRes; dynamic localRes;
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();

@ -9,7 +9,7 @@ import 'package:diplomaticquarterapp/core/service/base_service.dart';
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
class LabsService extends BaseService { class LabsService extends BaseService {
List<PatientLabOrders> patientLabOrdersList = List(); List<PatientLabOrders> patientLabOrdersList =[];
String labReportPDF = ""; String labReportPDF = "";
@ -30,16 +30,16 @@ class LabsService extends BaseService {
RequestPatientLabSpecialResult _requestPatientLabSpecialResult = RequestPatientLabSpecialResult(); RequestPatientLabSpecialResult _requestPatientLabSpecialResult = RequestPatientLabSpecialResult();
List<PatientLabSpecialResult> patientLabSpecialResult = List(); List<PatientLabSpecialResult> patientLabSpecialResult =[];
List<LabResult> labResultList = List(); List<LabResult> labResultList =[];
List<LabOrderResult> labOrdersResultsList = List(); List<LabOrderResult> labOrdersResultsList =[];
Future getLaboratoryResult({String projectID, int clinicID, String invoiceNo, String orderNo, String setupID, bool isVidaPlus}) async { Future getLaboratoryResult({String? projectID, int? clinicID, String? invoiceNo, String? orderNo, String? setupID, bool? isVidaPlus}) async {
hasError = false; hasError = false;
_requestPatientLabSpecialResult.projectID = projectID; _requestPatientLabSpecialResult.projectID = projectID;
_requestPatientLabSpecialResult.clinicID = clinicID; _requestPatientLabSpecialResult.clinicID = clinicID;
_requestPatientLabSpecialResult.invoiceNo = isVidaPlus ? "0" : invoiceNo; _requestPatientLabSpecialResult.invoiceNo = isVidaPlus! ? "0" : invoiceNo;
_requestPatientLabSpecialResult.invoiceNoVP = isVidaPlus ? invoiceNo : "0"; _requestPatientLabSpecialResult.invoiceNoVP = isVidaPlus ? invoiceNo : "0";
_requestPatientLabSpecialResult.orderNo = orderNo; _requestPatientLabSpecialResult.orderNo = orderNo;
@ -56,12 +56,12 @@ class LabsService extends BaseService {
}, body: _requestPatientLabSpecialResult.toJson()); }, body: _requestPatientLabSpecialResult.toJson());
} }
Future getPatientLabResult({PatientLabOrders patientLabOrder, bool isVidaPlus}) async { Future getPatientLabResult({PatientLabOrders? patientLabOrder, bool? isVidaPlus}) async {
hasError = false; hasError = false;
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();
body['InvoiceNo_VP'] = isVidaPlus ? patientLabOrder.invoiceNo : "0"; body['InvoiceNo_VP'] = isVidaPlus! ? patientLabOrder!.invoiceNo : "0";
body['InvoiceNo'] = isVidaPlus ? "0" : patientLabOrder.invoiceNo; body['InvoiceNo'] = isVidaPlus ? "0" : patientLabOrder!.invoiceNo;
body['OrderNo'] = patientLabOrder.orderNo; body['OrderNo'] = patientLabOrder!.orderNo;
body['isDentalAllowedBackend'] = false; body['isDentalAllowedBackend'] = false;
body['SetupID'] = patientLabOrder.setupID; body['SetupID'] = patientLabOrder.setupID;
body['ProjectID'] = patientLabOrder.projectID; body['ProjectID'] = patientLabOrder.projectID;
@ -177,11 +177,11 @@ class LabsService extends BaseService {
return Future.value(localRes); return Future.value(localRes);
} }
Future getPatientLabOrdersResults({PatientLabOrders patientLabOrder, String procedure}) async { Future getPatientLabOrdersResults({PatientLabOrders? patientLabOrder, String? procedure}) async {
hasError = false; hasError = false;
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();
body['InvoiceNo'] = "0"; body['InvoiceNo'] = "0";
body['InvoiceNo_VP'] = patientLabOrder.invoiceNo; body['InvoiceNo_VP'] = patientLabOrder!.invoiceNo;
body['OrderNo'] = patientLabOrder.orderNo; body['OrderNo'] = patientLabOrder.orderNo;
body['isDentalAllowedBackend'] = false; body['isDentalAllowedBackend'] = false;
body['SetupID'] = patientLabOrder.setupID; body['SetupID'] = patientLabOrder.setupID;
@ -201,17 +201,17 @@ class LabsService extends BaseService {
RequestSendLabReportEmail _requestSendLabReportEmail = RequestSendLabReportEmail(); RequestSendLabReportEmail _requestSendLabReportEmail = RequestSendLabReportEmail();
Future sendLabReportEmail({PatientLabOrders patientLabOrder, AuthenticatedUser userObj, bool isVidaPlus, bool isDownload = false}) async { Future sendLabReportEmail({PatientLabOrders? patientLabOrder, AuthenticatedUser? userObj, bool isVidaPlus = false, bool isDownload = false}) async {
_requestSendLabReportEmail.projectID = patientLabOrder.projectID; _requestSendLabReportEmail.projectID = patientLabOrder!.projectID;
_requestSendLabReportEmail.invoiceNo = isVidaPlus ? "0" : patientLabOrder.invoiceNo; _requestSendLabReportEmail.invoiceNo = isVidaPlus ? "0" : patientLabOrder.invoiceNo;
_requestSendLabReportEmail.invoiceNoVP = isVidaPlus ? patientLabOrder.invoiceNo : "0"; _requestSendLabReportEmail.invoiceNoVP = isVidaPlus ? patientLabOrder.invoiceNo : "0";
_requestSendLabReportEmail.doctorName = patientLabOrder.doctorName; _requestSendLabReportEmail.doctorName = patientLabOrder.doctorName;
_requestSendLabReportEmail.clinicName = patientLabOrder.clinicDescription; _requestSendLabReportEmail.clinicName = patientLabOrder.clinicDescription;
_requestSendLabReportEmail.patientName = userObj.firstName + " " + userObj.lastName; _requestSendLabReportEmail.patientName = userObj!.firstName + " " + userObj.lastName;
_requestSendLabReportEmail.patientIditificationNum = userObj.patientIdentificationNo; _requestSendLabReportEmail.patientIditificationNum = userObj.patientIdentificationNo;
_requestSendLabReportEmail.dateofBirth = userObj.dateofBirth; _requestSendLabReportEmail.dateofBirth = userObj.dateofBirth;
_requestSendLabReportEmail.to = userObj.emailAddress; _requestSendLabReportEmail.to = userObj.emailAddress;
_requestSendLabReportEmail.orderDate = '${patientLabOrder.orderDate.year}-${patientLabOrder.orderDate.month}-${patientLabOrder.orderDate.day}'; _requestSendLabReportEmail.orderDate = '${patientLabOrder.orderDate!.year}-${patientLabOrder.orderDate!.month}-${patientLabOrder.orderDate!.day}';
_requestSendLabReportEmail.patientMobileNumber = userObj.mobileNumber; _requestSendLabReportEmail.patientMobileNumber = userObj.mobileNumber;
_requestSendLabReportEmail.projectName = patientLabOrder.projectName; _requestSendLabReportEmail.projectName = patientLabOrder.projectName;
_requestSendLabReportEmail.setupID = patientLabOrder.setupID; _requestSendLabReportEmail.setupID = patientLabOrder.setupID;

@ -8,8 +8,8 @@ import 'package:diplomaticquarterapp/pages/MyAppointments/models/DoctorScheduleR
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
class MedicalService extends BaseService { class MedicalService extends BaseService {
List<AppoitmentAllHistoryResultList> appoitmentAllHistoryResultList = List(); List<AppoitmentAllHistoryResultList> appoitmentAllHistoryResultList =[];
List<DoctorScheduleResponse> doctorScheduleResponse = List(); List<DoctorScheduleResponse> doctorScheduleResponse =[];
List<String> freeSlots = []; List<String> freeSlots = [];
getAppointmentHistory({bool isActiveAppointment = false}) async { getAppointmentHistory({bool isActiveAppointment = false}) async {
hasError = false; hasError = false;
@ -39,7 +39,7 @@ class MedicalService extends BaseService {
} }
} }
addAmbulanceRequest({@required PatientER patientER}) async { addAmbulanceRequest({required PatientER patientER}) async {
hasError = false; hasError = false;
super.error = ""; super.error = "";
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();

@ -15,21 +15,21 @@ import 'package:diplomaticquarterapp/services/family_files/family_files_provider
import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart';
class MyBalanceService extends BaseService { class MyBalanceService extends BaseService {
List<PatientAdvanceBalanceAmount> patientAdvanceBalanceAmountList = List(); List<PatientAdvanceBalanceAmount> patientAdvanceBalanceAmountList =[];
dynamic totalAdvanceBalanceAmount; dynamic totalAdvanceBalanceAmount;
List<PatientInfo> patientInfoList = List(); List<PatientInfo> patientInfoList =[];
GetAllSharedRecordsByStatusResponse getAllSharedRecordsByStatusResponse = GetAllSharedRecordsByStatusResponse getAllSharedRecordsByStatusResponse =
GetAllSharedRecordsByStatusResponse(); GetAllSharedRecordsByStatusResponse();
PatientInfoAndMobileNumber patientInfoAndMobileNumber; PatientInfoAndMobileNumber? patientInfoAndMobileNumber;
String logInTokenID; String? logInTokenID;
String verificationCode; String? verificationCode;
String updatedRegisterBloodMessage = ""; String updatedRegisterBloodMessage = "";
AuthenticatedUserObject authenticatedUserObject = AuthenticatedUserObject authenticatedUserObject =
locator<AuthenticatedUserObject>(); locator<AuthenticatedUserObject>();
MyBalanceService() { // MyBalanceService() {
// getFamilyFiles(); // // getFamilyFiles();
} // }
getPatientAdvanceBalanceAmount() async { getPatientAdvanceBalanceAmount() async {
hasError = false; hasError = false;
@ -48,7 +48,7 @@ class MyBalanceService extends BaseService {
}, body: Map()); }, body: Map());
} }
getPatientInfoByPatientID({String id}) async { getPatientInfoByPatientID({required String id}) async {
hasError = false; hasError = false;
super.error = ""; super.error = "";
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();
@ -72,7 +72,7 @@ class MyBalanceService extends BaseService {
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();
body['isDentalAllowedBackend'] = false; body['isDentalAllowedBackend'] = false;
body['MobileNo'] = advanceModel.mobileNumber; body['MobileNo'] = advanceModel.mobileNumber;
body['ProjectID'] = advanceModel.hospitalsModel.iD; body['ProjectID'] = advanceModel.hospitalsModel!.iD;
body['PatientID'] = advanceModel.fileNumber; body['PatientID'] = advanceModel.fileNumber;
await baseAppClient.post(GET_PATIENT_INFO_BY_ID_AND_MOBILE_NUMBER, await baseAppClient.post(GET_PATIENT_INFO_BY_ID_AND_MOBILE_NUMBER,
@ -87,7 +87,7 @@ class MyBalanceService extends BaseService {
}, body: body); }, body: body);
} }
sendActivationCodeForAdvancePayment({int patientID, int projectID}) async { sendActivationCodeForAdvancePayment({required int patientID, required int projectID}) async {
hasError = false; hasError = false;
super.error = ""; super.error = "";
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();
@ -106,7 +106,7 @@ class MyBalanceService extends BaseService {
}, body: body); }, body: body);
} }
checkActivationCodeForAdvancePayment({String activationCode}) async { checkActivationCodeForAdvancePayment({required String activationCode}) async {
hasError = false; hasError = false;
super.error = ""; super.error = "";
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();
@ -141,7 +141,7 @@ class MyBalanceService extends BaseService {
} catch (error) { } catch (error) {
print(error); print(error);
hasError = true; hasError = true;
super.error = error; super.error = error.toString();
} }
} }

@ -8,9 +8,9 @@ import 'package:diplomaticquarterapp/core/service/base_service.dart';
import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart'; import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart';
class MyDoctorService extends BaseService { class MyDoctorService extends BaseService {
List<DoctorList> patientDoctorAppointmentList = List(); List<DoctorList> patientDoctorAppointmentList =[];
DoctorProfile doctorProfile; DoctorProfile? doctorProfile;
DoctorList doctorList; DoctorList? doctorList;
DoctorRating doctorRating = DoctorRating(); DoctorRating doctorRating = DoctorRating();
RequestPatientDoctorAppointment patientDoctorAppointmentRequest = RequestPatientDoctorAppointment patientDoctorAppointmentRequest =
@ -49,7 +49,7 @@ class MyDoctorService extends BaseService {
); );
Future getDoctorProfileAndRating( Future getDoctorProfileAndRating(
{int doctorId, int clinicID, int projectID}) async { {required int doctorId, required int clinicID, required int projectID}) async {
///GET DOCTOR PROFILE ///GET DOCTOR PROFILE
_requestDoctorProfile.doctorID = doctorId; _requestDoctorProfile.doctorID = doctorId;
_requestDoctorProfile.clinicID = clinicID; _requestDoctorProfile.clinicID = clinicID;
@ -59,10 +59,10 @@ class MyDoctorService extends BaseService {
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {
doctorProfile = DoctorProfile.fromJson(response['DoctorProfileList'][0]); doctorProfile = DoctorProfile.fromJson(response['DoctorProfileList'][0]);
doctorList = DoctorList.fromJson(response['DoctorProfileList'][0]); doctorList = DoctorList.fromJson(response['DoctorProfileList'][0]);
doctorList.clinicName = doctorProfile.clinicDescription; doctorList!.clinicName = doctorProfile!.clinicDescription!;
doctorList.doctorTitle = doctorProfile.doctorTitleForProfile; doctorList!.doctorTitle = doctorProfile!.doctorTitleForProfile!;
doctorList.name = doctorProfile.doctorName; doctorList!.name = doctorProfile!.doctorName!;
doctorList.projectName = doctorProfile.projectName; doctorList!.projectName = doctorProfile!.projectName!;
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
super.error = error; super.error = error;

@ -16,10 +16,10 @@ import 'package:diplomaticquarterapp/core/service/base_service.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
class PrescriptionsService extends BaseService { class PrescriptionsService extends BaseService {
List<Prescriptions> prescriptionsList = List(); List<Prescriptions> prescriptionsList =[];
List<PrescriptionReportINP> prescriptionReportListINP = List(); List<PrescriptionReportINP> prescriptionReportListINP =[];
List<GetCMCAllOrdersResponseModel> prescriptionsOrderList = List(); List<GetCMCAllOrdersResponseModel> prescriptionsOrderList =[];
List<PrescriptionInfoRCModel> prescriptionsOrderListRC = List(); List<PrescriptionInfoRCModel> prescriptionsOrderListRC =[];
var isMedDeliveryAllowed; var isMedDeliveryAllowed;
Future getPrescriptions() async { Future getPrescriptions() async {
@ -80,9 +80,9 @@ class PrescriptionsService extends BaseService {
} }
RequestPrescriptionReport _requestPrescriptionReport = RequestPrescriptionReport(appointmentNo: 0, isDentalAllowedBackend: false); RequestPrescriptionReport _requestPrescriptionReport = RequestPrescriptionReport(appointmentNo: 0, isDentalAllowedBackend: false);
List<PrescriptionReport> prescriptionReportList = List(); List<PrescriptionReport> prescriptionReportList =[];
Future getPrescriptionReport({Prescriptions prescriptions}) async { Future getPrescriptionReport({required Prescriptions prescriptions}) async {
hasError = false; hasError = false;
if (prescriptions.isInOutPatient == false) { if (prescriptions.isInOutPatient == false) {
_requestPrescriptionReport.dischargeNo = prescriptions.dischargeNo; _requestPrescriptionReport.dischargeNo = prescriptions.dischargeNo;
@ -95,11 +95,11 @@ class PrescriptionsService extends BaseService {
_requestPrescriptionReport.episodeID = prescriptions.episodeID; _requestPrescriptionReport.episodeID = prescriptions.episodeID;
_requestPrescriptionReport.appointmentNo = prescriptions.appointmentNo; _requestPrescriptionReport.appointmentNo = prescriptions.appointmentNo;
await baseAppClient.post(prescriptions.isInOutPatient ? GET_PRESCRIPTION_REPORT_ENH : GET_PRESCRIPTION_REPORT, onSuccess: (dynamic response, int statusCode) { await baseAppClient.post(prescriptions.isInOutPatient! ? GET_PRESCRIPTION_REPORT_ENH : GET_PRESCRIPTION_REPORT, onSuccess: (dynamic response, int statusCode) {
prescriptionReportList.clear(); prescriptionReportList.clear();
prescriptionReportEnhList.clear(); prescriptionReportEnhList.clear();
isMedDeliveryAllowed = response['IsHomeMedicineDeliverySupported']; isMedDeliveryAllowed = response['IsHomeMedicineDeliverySupported'];
if (prescriptions.isInOutPatient) { if (prescriptions.isInOutPatient!) {
response['ListPRM'].forEach((prescriptions) { response['ListPRM'].forEach((prescriptions) {
prescriptionReportList.add(PrescriptionReport.fromJson(prescriptions)); prescriptionReportList.add(PrescriptionReport.fromJson(prescriptions));
prescriptionReportEnhList.add(PrescriptionReportEnh.fromJson(prescriptions)); prescriptionReportEnhList.add(PrescriptionReportEnh.fromJson(prescriptions));
@ -147,9 +147,9 @@ class PrescriptionsService extends BaseService {
longitude: 0, longitude: 0,
isDentalAllowedBackend: false, isDentalAllowedBackend: false,
); );
List<PharmacyPrescriptions> pharmacyPrescriptionsList = List(); List<PharmacyPrescriptions> pharmacyPrescriptionsList =[];
Future getListPharmacyForPrescriptions({int itemId}) async { Future getListPharmacyForPrescriptions({required int itemId}) async {
hasError = false; hasError = false;
requestGetListPharmacyForPrescriptions.itemID = itemId; requestGetListPharmacyForPrescriptions.itemID = itemId;
@ -175,9 +175,9 @@ class PrescriptionsService extends BaseService {
isDentalAllowedBackend: false, isDentalAllowedBackend: false,
); );
List<PrescriptionReportEnh> prescriptionReportEnhList = List(); List<PrescriptionReportEnh> prescriptionReportEnhList =[];
Future getPrescriptionReportEnh({PrescriptionsOrder prescriptionsOrder}) async { Future getPrescriptionReportEnh({required PrescriptionsOrder prescriptionsOrder}) async {
bool isInPatient = false; bool isInPatient = false;
prescriptionsList.forEach((element) { prescriptionsList.forEach((element) {
if (prescriptionsOrder.appointmentNo == "0") { if (prescriptionsOrder.appointmentNo == "0") {
@ -188,7 +188,7 @@ class PrescriptionsService extends BaseService {
_requestPrescriptionReportEnh.episodeID = element.episodeID; _requestPrescriptionReportEnh.episodeID = element.episodeID;
_requestPrescriptionReportEnh.setupID = element.setupID; _requestPrescriptionReportEnh.setupID = element.setupID;
_requestPrescriptionReportEnh.dischargeNo = element.dischargeNo; _requestPrescriptionReportEnh.dischargeNo = element.dischargeNo;
isInPatient = element.isInOutPatient; isInPatient = element.isInOutPatient!;
} }
} else { } else {
if (int.parse(prescriptionsOrder.appointmentNo) == element.appointmentNo) { if (int.parse(prescriptionsOrder.appointmentNo) == element.appointmentNo) {
@ -198,7 +198,7 @@ class PrescriptionsService extends BaseService {
_requestPrescriptionReportEnh.episodeID = element.episodeID; _requestPrescriptionReportEnh.episodeID = element.episodeID;
_requestPrescriptionReportEnh.setupID = element.setupID; _requestPrescriptionReportEnh.setupID = element.setupID;
_requestPrescriptionReportEnh.dischargeNo = element.dischargeNo; _requestPrescriptionReportEnh.dischargeNo = element.dischargeNo;
isInPatient = element.isInOutPatient; isInPatient = element.isInOutPatient!;
} }
} }
}); });
@ -225,7 +225,7 @@ class PrescriptionsService extends BaseService {
}, body: _requestPrescriptionReportEnh.toJson()); }, body: _requestPrescriptionReportEnh.toJson());
} }
Future updatePressOrderRC({@required int presOrderID}) async { Future updatePressOrderRC({required int presOrderID}) async {
hasError = false; hasError = false;
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();
body['Id'] = presOrderID; body['Id'] = presOrderID;
@ -237,7 +237,7 @@ class PrescriptionsService extends BaseService {
}, body: body); }, body: body);
} }
Future updatePressOrder({@required int presOrderID}) async { Future updatePressOrder({required int presOrderID}) async {
hasError = false; hasError = false;
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();
body['PresOrderID'] = presOrderID; body['PresOrderID'] = presOrderID;

@ -5,15 +5,15 @@ import 'package:diplomaticquarterapp/core/service/base_service.dart';
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
class RadiologyService extends BaseService { class RadiologyService extends BaseService {
List<FinalRadiology> finalRadiologyList = List(); List<FinalRadiology> finalRadiologyList = [];
String url = ''; String url = '';
bool isRadiologyVIDAPlus = false; bool isRadiologyVIDAPlus = false;
Future getRadImageURL({int invoiceNo, int lineItem, int projectId, bool isVidaPlus}) async { Future getRadImageURL({int? invoiceNo, int? lineItem, int? projectId, bool? isVidaPlus}) async {
hasError = false; hasError = false;
final Map<String, dynamic> body = new Map<String, dynamic>(); final Map<String, dynamic> body = new Map<String, dynamic>();
body['InvoiceNo'] = isVidaPlus ? "0" : invoiceNo; body['InvoiceNo'] = isVidaPlus! ? "0" : invoiceNo;
body['InvoiceNo_VP'] = isVidaPlus ? invoiceNo : "0"; body['InvoiceNo_VP'] = isVidaPlus ? invoiceNo : "0";
body['LineItemNo'] = lineItem; body['LineItemNo'] = lineItem;
body['ProjectID'] = projectId; body['ProjectID'] = projectId;
@ -63,16 +63,16 @@ class RadiologyService extends BaseService {
RequestSendRadReportEmail _requestSendRadReportEmail = RequestSendRadReportEmail(); RequestSendRadReportEmail _requestSendRadReportEmail = RequestSendRadReportEmail();
Future sendRadReportEmail({FinalRadiology finalRadiology, AuthenticatedUser userObj}) async { Future sendRadReportEmail({FinalRadiology? finalRadiology, AuthenticatedUser? userObj}) async {
_requestSendRadReportEmail.projectID = finalRadiology.projectID; _requestSendRadReportEmail.projectID = finalRadiology!.projectID;
_requestSendRadReportEmail.clinicName = finalRadiology.clinicDescription; _requestSendRadReportEmail.clinicName = finalRadiology.clinicDescription;
_requestSendRadReportEmail.invoiceNo = finalRadiology.invoiceNo; _requestSendRadReportEmail.invoiceNo = finalRadiology.invoiceNo;
_requestSendRadReportEmail.invoiceNo_VP = finalRadiology.invoiceNo_VP; _requestSendRadReportEmail.invoiceNo_VP = finalRadiology.invoiceNo_VP;
_requestSendRadReportEmail.invoiceLineItemNo = finalRadiology.invoiceLineItemNo; _requestSendRadReportEmail.invoiceLineItemNo = finalRadiology.invoiceLineItemNo;
_requestSendRadReportEmail.setupID = finalRadiology.setupID; _requestSendRadReportEmail.setupID = finalRadiology.setupID;
_requestSendRadReportEmail.doctorName = finalRadiology.doctorName; _requestSendRadReportEmail.doctorName = finalRadiology.doctorName;
_requestSendRadReportEmail.orderDate = '${finalRadiology.orderDate.year}-${finalRadiology.orderDate.month}-${finalRadiology.orderDate.day}'; _requestSendRadReportEmail.orderDate = '${finalRadiology.orderDate!.year}-${finalRadiology.orderDate!.month}-${finalRadiology.orderDate!.day}';
_requestSendRadReportEmail.patientIditificationNum = userObj.patientIdentificationNo; _requestSendRadReportEmail.patientIditificationNum = userObj!.patientIdentificationNo;
_requestSendRadReportEmail.patientMobileNumber = userObj.mobileNumber; _requestSendRadReportEmail.patientMobileNumber = userObj.mobileNumber;
_requestSendRadReportEmail.patientName = userObj.firstName + " " + userObj.lastName; _requestSendRadReportEmail.patientName = userObj.firstName + " " + userObj.lastName;
_requestSendRadReportEmail.projectName = finalRadiology.projectName; _requestSendRadReportEmail.projectName = finalRadiology.projectName;

@ -5,8 +5,8 @@ import 'package:diplomaticquarterapp/core/service/base_service.dart';
import 'package:diplomaticquarterapp/pages/feedback/appointment_history.dart'; import 'package:diplomaticquarterapp/pages/feedback/appointment_history.dart';
class ReportsMonthlyService extends BaseService { class ReportsMonthlyService extends BaseService {
List<Reports> reportsList = List(); List<Reports> reportsList =[];
List<AppointmentHistory> appointHistoryList = List(); List<AppointmentHistory> appointHistoryList =[];
RequestReports _requestReports = RequestReports( RequestReports _requestReports = RequestReports(
isReport: true, isReport: true,

@ -83,7 +83,7 @@ class ReportsService extends BaseService {
}, body: Map<String, dynamic>()); }, body: Map<String, dynamic>());
} }
Future updatePatientHealthSummaryReport({bool isSummary}) async { Future updatePatientHealthSummaryReport({required bool isSummary}) async {
Map<String, dynamic> body = Map<String, dynamic>(); Map<String, dynamic> body = Map<String, dynamic>();
body['RSummaryReport'] = isSummary; body['RSummaryReport'] = isSummary;
hasError = false; hasError = false;
@ -93,7 +93,7 @@ class ReportsService extends BaseService {
}, body: body); }, body: body);
} }
Future updateEmail({String email}) async { Future updateEmail({required String email}) async {
Map<String, dynamic> body = Map<String, dynamic>(); Map<String, dynamic> body = Map<String, dynamic>();
body['EmailAddress'] = email; body['EmailAddress'] = email;
body['isDentalAllowedBackend'] = false; body['isDentalAllowedBackend'] = false;

@ -4,13 +4,13 @@ import 'package:diplomaticquarterapp/core/model/vital_sign/vital_sign_res_model.
import '../base_service.dart'; import '../base_service.dart';
class VitalSignService extends BaseService { class VitalSignService extends BaseService {
List<VitalSignResModel> vitalSignResModelList = List(); List<VitalSignResModel> vitalSignResModelList =[];
String weightKg = ""; String weightKg = "";
String heightCm = ""; String heightCm = "";
String bloadType = ""; String bloadType = "";
Future getPatientRadOrders({int appointmentNo, int projectID}) async { Future getPatientRadOrders({required int appointmentNo, required int projectID}) async {
hasError = false; hasError = false;
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();
if (appointmentNo != null && projectID != null) { if (appointmentNo != null && projectID != null) {

@ -5,7 +5,7 @@ import 'package:diplomaticquarterapp/core/model/notifications/mark_message_as_re
import 'package:diplomaticquarterapp/core/service/base_service.dart'; import 'package:diplomaticquarterapp/core/service/base_service.dart';
class NotificationService extends BaseService { class NotificationService extends BaseService {
List<GetNotificationsResponseModel> notificationsList = List(); List<GetNotificationsResponseModel> notificationsList =[];
Future getAllNotifications(GetNotificationsRequestModel getNotificationsRequestModel ) async { Future getAllNotifications(GetNotificationsRequestModel getNotificationsRequestModel ) async {
hasError = false; hasError = false;

@ -5,9 +5,9 @@ import 'package:diplomaticquarterapp/core/model/pharmacy/offers_model.dart';
import 'base_service.dart'; import 'base_service.dart';
class OffersCategoriseService extends BaseService { class OffersCategoriseService extends BaseService {
List<OffersModel> _offersList = List(); List<OffersModel> _offersList =[];
List<OffersModel> get offersList => _offersList; List<OffersModel> get offersList => _offersList;
List<OfferProductsModel> _offerProducts = List(); List<OfferProductsModel> _offerProducts =[];
List<OfferProductsModel> get offersProducts => _offerProducts; List<OfferProductsModel> get offersProducts => _offerProducts;
clearCategorise() { clearCategorise() {
@ -35,7 +35,7 @@ class OffersCategoriseService extends BaseService {
); );
} }
Future getOffersProducts({String id}) async { Future getOffersProducts({required String id}) async {
hasError = false; hasError = false;
_offerProducts.clear(); _offerProducts.clear();
String endPoint = String endPoint =

@ -24,7 +24,7 @@ import 'package:flutter/cupertino.dart';
Map<String, String> packagesAuthHeader = {}; Map<String, String> packagesAuthHeader = {};
class OffersAndPackagesServices extends BaseService { class OffersAndPackagesServices extends BaseService {
AuthenticatedUser patientUser; AuthenticatedUser? patientUser;
List<PackagesCategoriesResponseModel> categoryList = []; List<PackagesCategoriesResponseModel> categoryList = [];
List<OfferProject> projectsList = []; List<OfferProject> projectsList = [];
List<PackagesResponseModel> productList = []; List<PackagesResponseModel> productList = [];
@ -35,14 +35,14 @@ class OffersAndPackagesServices extends BaseService {
List<PackagesResponseModel> ordersHistory = []; List<PackagesResponseModel> ordersHistory = [];
List<PackagesCartItemsResponseModel> cartItemList = []; List<PackagesCartItemsResponseModel> cartItemList = [];
List<HospitalsModel> _hospitals = []; List<HospitalsModel> _hospitals = [];
List<HospitalsModel> get hospitals => _hospitals; List<HospitalsModel> get hospitals => _hospitals;
String cartItemCount = ""; String cartItemCount = "";
PackagesCustomerResponseModel customer; PackagesCustomerResponseModel? customer;
Future<List<PackagesCategoriesResponseModel>> getAllCategories(OffersCategoriesRequestModel request) async { Future<List<PackagesCategoriesResponseModel>> getAllCategories(OffersCategoriesRequestModel request) async {
if(categoryList.isNotEmpty) if (categoryList.isNotEmpty) return categoryList;
return categoryList;
var url = EXA_CART_API_BASE_URL + PACKAGES_CATEGORIES; var url = EXA_CART_API_BASE_URL + PACKAGES_CATEGORIES;
await baseAppClient.simpleGet(url, headers: packagesAuthHeader, onSuccess: (dynamic stringResponse, int statusCode) { await baseAppClient.simpleGet(url, headers: packagesAuthHeader, onSuccess: (dynamic stringResponse, int statusCode) {
@ -58,24 +58,23 @@ class OffersAndPackagesServices extends BaseService {
} }
Future<List<OfferProject>> getAllStores() async { Future<List<OfferProject>> getAllStores() async {
if(projectsList.isNotEmpty) if (projectsList.isNotEmpty) return projectsList;
return projectsList;
var url = EXA_CART_API_BASE_URL + PACKAGES_STORES; var url = EXA_CART_API_BASE_URL + PACKAGES_STORES;
await baseAppClient.simpleGet(url, headers: packagesAuthHeader, onSuccess: (dynamic stringResponse, int statusCode) { await baseAppClient.simpleGet(url, headers: packagesAuthHeader, onSuccess: (dynamic stringResponse, int statusCode) {
if (statusCode == 200) { if (statusCode == 200) {
var jsonResponse = json.decode(stringResponse); var jsonResponse = json.decode(stringResponse);
final response = OfferProjectsResponseModel.fromJson(jsonResponse); final response = OfferProjectsResponseModel.fromJson(jsonResponse);
projectsList = response.project; projectsList = response.project!;
} }
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
throw error; throw error;
}, queryParams: {'fields' : 'id,name'}); }, queryParams: {'fields': 'id,name'});
return projectsList; return projectsList;
} }
Future<List<PackagesResponseModel>> getAllProducts({@required OffersProductsRequestModel request, @required BuildContext context, @required bool showLoading = true, bool byOffset = true}) async { Future<List<PackagesResponseModel>> getAllProducts({required OffersProductsRequestModel request, required BuildContext context, bool showLoading = true, bool byOffset = true}) async {
Future errorThrow; Future errorThrow;
productList = []; productList = [];
var url = EXA_CART_API_BASE_URL + PACKAGES_PRODUCTS; var url = EXA_CART_API_BASE_URL + PACKAGES_PRODUCTS;
@ -91,7 +90,7 @@ class OffersAndPackagesServices extends BaseService {
return productList; return productList;
} }
Future<List<TamaraPaymentOption>> getTamaraOptions({@required BuildContext context, @required bool showLoading = true}) async { Future<List<TamaraPaymentOption>> getTamaraOptions({required BuildContext context, bool showLoading = true}) async {
if (tamaraPaymentOptions != null && tamaraPaymentOptions.isNotEmpty) return tamaraPaymentOptions; if (tamaraPaymentOptions != null && tamaraPaymentOptions.isNotEmpty) return tamaraPaymentOptions;
tamaraPaymentOptions.clear(); tamaraPaymentOptions.clear();
@ -110,7 +109,7 @@ class OffersAndPackagesServices extends BaseService {
return tamaraPaymentOptions; return tamaraPaymentOptions;
} }
Future<List<PackagesResponseModel>> getLatestOffers({@required OffersProductsRequestModel request, @required BuildContext context, @required bool showLoading = true}) async { Future<List<PackagesResponseModel>> getLatestOffers({required OffersProductsRequestModel request, required BuildContext context, bool showLoading = true}) async {
var url = EXA_CART_API_BASE_URL + PACKAGES_PRODUCTS; var url = EXA_CART_API_BASE_URL + PACKAGES_PRODUCTS;
await baseAppClient.simpleGet(url, headers: packagesAuthHeader, onSuccess: (dynamic stringResponse, int statusCode) { await baseAppClient.simpleGet(url, headers: packagesAuthHeader, onSuccess: (dynamic stringResponse, int statusCode) {
latestOffersList.clear(); latestOffersList.clear();
@ -127,7 +126,7 @@ class OffersAndPackagesServices extends BaseService {
return latestOffersList; return latestOffersList;
} }
Future<List<PackagesResponseModel>> getBestSellers({@required OffersProductsRequestModel request, @required BuildContext context, @required bool showLoading = true}) async { Future<List<PackagesResponseModel>> getBestSellers({required OffersProductsRequestModel request, required BuildContext context, bool showLoading = true}) async {
var url = EXA_CART_API_BASE_URL + PACKAGES_PRODUCTS; var url = EXA_CART_API_BASE_URL + PACKAGES_PRODUCTS;
await baseAppClient.simpleGet(url, headers: packagesAuthHeader, onSuccess: (dynamic stringResponse, int statusCode) { await baseAppClient.simpleGet(url, headers: packagesAuthHeader, onSuccess: (dynamic stringResponse, int statusCode) {
bestSellerList.clear(); bestSellerList.clear();
@ -144,7 +143,7 @@ class OffersAndPackagesServices extends BaseService {
return bestSellerList; return bestSellerList;
} }
Future<List<PackagesResponseModel>> getBanners({@required OffersProductsRequestModel request, @required BuildContext context, @required bool showLoading = true}) async { Future<List<PackagesResponseModel>> getBanners({required OffersProductsRequestModel request, required BuildContext context, bool showLoading = true}) async {
var url = EXA_CART_API_BASE_URL + PACKAGES_PRODUCTS; var url = EXA_CART_API_BASE_URL + PACKAGES_PRODUCTS;
await baseAppClient.simpleGet(url, headers: packagesAuthHeader, onSuccess: (dynamic stringResponse, int statusCode) { await baseAppClient.simpleGet(url, headers: packagesAuthHeader, onSuccess: (dynamic stringResponse, int statusCode) {
if (statusCode == 200) { if (statusCode == 200) {
@ -160,7 +159,7 @@ class OffersAndPackagesServices extends BaseService {
return bannersList; return bannersList;
} }
Future loadOffersPackagesDataForMainPage({@required BuildContext context, bool showLoading = true, Function completion}) async { Future loadOffersPackagesDataForMainPage({required BuildContext context, bool showLoading = true, required Function completion}) async {
var finished = 0; var finished = 0;
var totalCalls = 2; var totalCalls = 2;
@ -184,7 +183,7 @@ class OffersAndPackagesServices extends BaseService {
if (patientUser != null) { if (patientUser != null) {
customer = await getCurrentCustomer(context: context, showLoading: showLoading); customer = await getCurrentCustomer(context: context, showLoading: showLoading);
if (customer == null) { if (customer == null) {
createCustomer(PackagesCustomerRequestModel.fromUser(patientUser), context: context); createCustomer(PackagesCustomerRequestModel.fromUser(patientUser!), context: context);
} }
} }
@ -212,11 +211,11 @@ class OffersAndPackagesServices extends BaseService {
// -------------------- // --------------------
// Create Customer // Create Customer
// -------------------- // --------------------
Future createCustomer(PackagesCustomerRequestModel request, {@required BuildContext context, bool showLoading = true, Function(bool) completion}) async { Future createCustomer(PackagesCustomerRequestModel request, {required BuildContext context, bool showLoading = true, Function(bool)? completion}) async {
if (customer != null) return Future.value(customer); if (customer != null) return Future.value(customer);
customer = null; customer = null;
Future errorThrow; Future? errorThrow;
_showLoading(context, showLoading); _showLoading(context, showLoading);
var url = EXA_CART_API_BASE_URL + PACKAGES_CUSTOMER; var url = EXA_CART_API_BASE_URL + PACKAGES_CUSTOMER;
@ -235,11 +234,11 @@ class OffersAndPackagesServices extends BaseService {
return errorThrow ?? customer; return errorThrow ?? customer;
} }
Future<PackagesCustomerResponseModel> getCurrentCustomer({@required BuildContext context, bool showLoading = true}) async { Future<PackagesCustomerResponseModel> getCurrentCustomer({required BuildContext context, bool showLoading = true}) async {
if (customer != null) return Future.value(customer); if (customer != null) return Future.value(customer);
_showLoading(context, showLoading); _showLoading(context, showLoading);
var url = EXA_CART_API_BASE_URL + PACKAGES_CUSTOMER + "/username/${patientUser.patientID}"; var url = EXA_CART_API_BASE_URL + PACKAGES_CUSTOMER + "/username/${patientUser!.patientID}";
await baseAppClient.simpleGet(url, headers: packagesAuthHeader, onSuccess: (dynamic stringResponse, int statusCode) { await baseAppClient.simpleGet(url, headers: packagesAuthHeader, onSuccess: (dynamic stringResponse, int statusCode) {
var jsonResponse = json.decode(stringResponse); var jsonResponse = json.decode(stringResponse);
var customerJson = jsonResponse['customers'].first; var customerJson = jsonResponse['customers'].first;
@ -249,18 +248,18 @@ class OffersAndPackagesServices extends BaseService {
}); });
_hideLoading(context, showLoading); _hideLoading(context, showLoading);
return customer; return customer!;
} }
// -------------------- // --------------------
// Shopping Cart // Shopping Cart
// -------------------- // --------------------
Future<Map<String, dynamic>> cartItems({@required BuildContext context, bool showLoading = true}) async { Future<Map<String, dynamic>?> cartItems({required BuildContext context, bool showLoading = true}) async {
Future errorThrow; Future errorThrow;
cartItemList.clear(); cartItemList.clear();
_showLoading(context, showLoading); _showLoading(context, showLoading);
var url = EXA_CART_API_BASE_URL + PACKAGES_SHOPPING_CART + '/${customer.id}'; var url = EXA_CART_API_BASE_URL + PACKAGES_SHOPPING_CART + '/${customer!.id}';
Map<String, dynamic> jsonResponse; Map<String, dynamic> jsonResponse;
await baseAppClient.simpleGet(url, headers: packagesAuthHeader, onSuccess: (dynamic stringResponse, int statusCode) { await baseAppClient.simpleGet(url, headers: packagesAuthHeader, onSuccess: (dynamic stringResponse, int statusCode) {
_hideLoading(context, showLoading); _hideLoading(context, showLoading);
@ -269,20 +268,20 @@ class OffersAndPackagesServices extends BaseService {
jsonResponse['shopping_carts'].forEach((json) { jsonResponse['shopping_carts'].forEach((json) {
cartItemList.add(PackagesCartItemsResponseModel.fromJson(json)); cartItemList.add(PackagesCartItemsResponseModel.fromJson(json));
}); });
return jsonResponse;
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
_hideLoading(context, showLoading); _hideLoading(context, showLoading);
log(error); log(error);
errorThrow = Future.error({"error": error, "statusCode": statusCode}); errorThrow = Future.error({"error": error, "statusCode": statusCode});
return errorThrow;
}, queryParams: null); }, queryParams: null);
return errorThrow ?? jsonResponse;
} }
Future<ResponseModel<PackagesCartItemsResponseModel>> addProductToCart(AddProductToCartRequestModel request, {@required BuildContext context, bool showLoading = true}) async { Future<ResponseModel<PackagesCartItemsResponseModel>?> addProductToCart(AddProductToCartRequestModel request, {required BuildContext context, bool showLoading = true}) async {
Future errorThrow; Future errorThrow;
ResponseModel<PackagesCartItemsResponseModel> response; ResponseModel<PackagesCartItemsResponseModel> response;
request.customer_id = customer.id; request.customer_id = customer!.id;
_showLoading(context, showLoading); _showLoading(context, showLoading);
var url = EXA_CART_API_BASE_URL + PACKAGES_SHOPPING_CART; var url = EXA_CART_API_BASE_URL + PACKAGES_SHOPPING_CART;
@ -293,58 +292,57 @@ class OffersAndPackagesServices extends BaseService {
var jsonCartItem = jsonResponse["shopping_carts"][0]; var jsonCartItem = jsonResponse["shopping_carts"][0];
response = ResponseModel(status: true, data: PackagesCartItemsResponseModel.fromJson(jsonCartItem), error: null); response = ResponseModel(status: true, data: PackagesCartItemsResponseModel.fromJson(jsonCartItem), error: null);
cartItemCount = (jsonResponse['count'] ?? 0).toString(); cartItemCount = (jsonResponse['count'] ?? 0).toString();
return response;
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
_hideLoading(context, showLoading); _hideLoading(context, showLoading);
errorThrow = Future.error(ResponseModel(status: true, data: null, error: error)); errorThrow = Future.error(ResponseModel(status: true, data: null, error: error));
return errorThrow;
}); });
return errorThrow ?? response;
} }
Future updateProductToCart(int cartItemID, {UpdateProductToCartRequestModel request, @required BuildContext context, bool showLoading = true}) async { Future updateProductToCart(int cartItemID, {UpdateProductToCartRequestModel? request, required BuildContext context, bool showLoading = true}) async {
Future errorThrow; Future errorThrow;
_showLoading(context, showLoading); _showLoading(context, showLoading);
var url = EXA_CART_API_BASE_URL + PACKAGES_SHOPPING_CART + '/$cartItemID'; var url = EXA_CART_API_BASE_URL + PACKAGES_SHOPPING_CART + '/$cartItemID';
await baseAppClient.simplePut(url, headers: packagesAuthHeader, body: request.json(), onSuccess: (dynamic stringResponse, int statusCode) { await baseAppClient.simplePut(url, headers: packagesAuthHeader, body: request!.json(), onSuccess: (dynamic stringResponse, int statusCode) {
_hideLoading(context, showLoading); _hideLoading(context, showLoading);
var jsonResponse = json.decode(stringResponse); var jsonResponse = json.decode(stringResponse);
return jsonResponse;
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
_hideLoading(context, showLoading); _hideLoading(context, showLoading);
log(error); log(error);
errorThrow = Future.error({"error": error, "statusCode": statusCode}); errorThrow = Future.error({"error": error, "statusCode": statusCode});
return errorThrow;
}); });
return errorThrow ?? bannersList;
} }
Future<bool> deleteProductFromCart(int cartItemID, {@required BuildContext context, bool showLoading = true}) async { Future<bool?> deleteProductFromCart(int cartItemID, {required BuildContext context, bool showLoading = true}) async {
Future errorThrow; Future errorThrow;
_showLoading(context, showLoading); _showLoading(context, showLoading);
var url = EXA_CART_API_BASE_URL + PACKAGES_SHOPPING_CART + '/$cartItemID'; var url = EXA_CART_API_BASE_URL + PACKAGES_SHOPPING_CART + '/$cartItemID';
await baseAppClient.simpleDelete(url, headers: packagesAuthHeader, onSuccess: (dynamic stringResponse, int statusCode) { await baseAppClient.simpleDelete(url, headers: packagesAuthHeader, onSuccess: (dynamic stringResponse, int statusCode) {
_hideLoading(context, showLoading); _hideLoading(context, showLoading);
return true;
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
_hideLoading(context, showLoading); _hideLoading(context, showLoading);
log(error); log(error);
errorThrow = Future.error({"error": error, "statusCode": statusCode}); errorThrow = Future.error({"error": error, "statusCode": statusCode});
return errorThrow;
}); });
return errorThrow ?? true;
} }
// -------------------- // --------------------
// Place Order // Place Order
// -------------------- // --------------------
Future placeOrder({@required Map<dynamic, dynamic> paymentParams, @required int projectID, @required BuildContext context, bool showLoading = true}) async { Future placeOrder({required Map<dynamic, dynamic> paymentParams, required int projectID, required BuildContext context, bool showLoading = true}) async {
Future errorThrow; Future errorThrow;
Map<dynamic, dynamic> jsonBody = { Map<dynamic, dynamic> jsonBody = {
"customer_id": customer.id, "customer_id": customer!.id,
"project_id": projectID, "project_id": projectID,
"billing_address": {"email": patientUser.emailAddress, "phone_number": patientUser.mobileNumber}, "billing_address": {"email": patientUser!.emailAddress, "phone_number": patientUser!.mobileNumber},
}; };
jsonBody.addAll(paymentParams); jsonBody.addAll(paymentParams);
jsonBody = {'order': jsonBody}; jsonBody = {'order': jsonBody};
@ -359,25 +357,25 @@ class OffersAndPackagesServices extends BaseService {
var jsonResponse = json.decode(stringResponse); var jsonResponse = json.decode(stringResponse);
order_id = jsonResponse['orders'][0]['id']; order_id = jsonResponse['orders'][0]['id'];
return order_id;
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
_hideLoading(context, showLoading); _hideLoading(context, showLoading);
log(error); log(error);
errorThrow = Future.error(error); errorThrow = Future.error(error);
return errorThrow;
}); });
return errorThrow ?? order_id;
} }
// -------------------- // --------------------
// Order History // Order History
// -------------------- // --------------------
Future<List<PackagesResponseModel>> orderHistory({@required BuildContext context, bool showLoading = true}) async { Future<List<PackagesResponseModel>?> orderHistory({required BuildContext context, bool showLoading = true}) async {
// if(ordersHistory.isNotEmpty) // if(ordersHistory.isNotEmpty)
// return ordersHistory; // return ordersHistory;
Future errorThrow; Future errorThrow;
// https://mdlaboratories.com/offersdiscounts/api/orders/items/0535256053?fields=id,product,utilize_by_vida,valid_until_date_utc,order_id&page=1&limit=100 // https://mdlaboratories.com/offersdiscounts/api/orders/items/0535256053?fields=id,product,utilize_by_vida,valid_until_date_utc,order_id&page=1&limit=100
Map<String, dynamic> queryParams ={}; Map<String, dynamic> queryParams = {};
queryParams['fields'] = 'id,product,utilize_by_vida,valid_until_date_utc,order_id'; queryParams['fields'] = 'id,product,utilize_by_vida,valid_until_date_utc,order_id';
queryParams['page'] = "1"; queryParams['page'] = "1";
queryParams['limit'] = "100"; queryParams['limit'] = "100";
@ -392,17 +390,16 @@ class OffersAndPackagesServices extends BaseService {
final order_items = jsonResponse["order_items"] as List; final order_items = jsonResponse["order_items"] as List;
ordersHistory = order_items.map((e) => PackagesResponseModel().fromJson(e['product'])).toList(); ordersHistory = order_items.map((e) => PackagesResponseModel().fromJson(e['product'])).toList();
print(ordersHistory); print(ordersHistory);
return ordersHistory;
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
_hideLoading(context, showLoading); _hideLoading(context, showLoading);
log(error); log(error);
errorThrow = Future.error(error); errorThrow = Future.error(error);
return errorThrow;
}); });
return errorThrow ?? ordersHistory;
} }
Future<ResponseModel<PackagesOrderResponseModel>> getOrderById(int id, {@required BuildContext context, bool showLoading = true}) async { Future<ResponseModel<PackagesOrderResponseModel>?> getOrderById(int id, {required BuildContext context, bool showLoading = true}) async {
Future errorThrow; Future errorThrow;
ResponseModel<PackagesOrderResponseModel> response; ResponseModel<PackagesOrderResponseModel> response;
@ -414,12 +411,12 @@ class OffersAndPackagesServices extends BaseService {
var jsonResponse = json.decode(stringResponse); var jsonResponse = json.decode(stringResponse);
var jsonOrder = jsonResponse['orders'][0]; var jsonOrder = jsonResponse['orders'][0];
response = ResponseModel(status: true, data: PackagesOrderResponseModel.fromJson(jsonOrder)); response = ResponseModel(status: true, data: PackagesOrderResponseModel.fromJson(jsonOrder));
return response;
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
_hideLoading(context, showLoading); _hideLoading(context, showLoading);
errorThrow = Future.error(ResponseModel(status: false, error: error)); errorThrow = Future.error(ResponseModel(status: false, error: error));
return errorThrow;
}, queryParams: null); }, queryParams: null);
return errorThrow ?? response;
} }
Future getHospitals({bool isResBasedOnLoc = true}) async { Future getHospitals({bool isResBasedOnLoc = true}) async {
@ -429,18 +426,16 @@ class OffersAndPackagesServices extends BaseService {
body['IsOnlineCheckIn'] = isResBasedOnLoc; body['IsOnlineCheckIn'] = isResBasedOnLoc;
body['PatientOutSA'] = 0; body['PatientOutSA'] = 0;
await baseAppClient.post(GET_PROJECT, await baseAppClient.post(GET_PROJECT, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) { _hospitals.clear();
_hospitals.clear(); response['ListProject'].forEach((hospital) {
response['ListProject'].forEach((hospital) { _hospitals.add(HospitalsModel.fromJson(hospital));
_hospitals.add(HospitalsModel.fromJson(hospital)); });
}); }, onFailure: (String error, int statusCode) {
}, onFailure: (String error, int statusCode) { hasError = true;
hasError = true; super.error = error;
super.error = error; }, body: body);
}, body: body);
} }
} }
_showLoading(BuildContext context, bool flag) { _showLoading(BuildContext context, bool flag) {

@ -6,7 +6,7 @@ import 'lacum-service.dart';
class LacumRegistrationService extends LacumService{ class LacumRegistrationService extends LacumService{
ListUserAgreement listUserAgreement; ListUserAgreement? listUserAgreement;
Future getLacumAccountInformationById(String patientIdentificationNo) async { Future getLacumAccountInformationById(String patientIdentificationNo) async {
hasError = false; hasError = false;

@ -9,8 +9,8 @@ class LacumService extends BaseService{
String errorMsg = ''; String errorMsg = '';
String successMsg = ''; String successMsg = '';
LacumAccountInformation lacumInformation; LacumAccountInformation? lacumInformation;
LacumAccountInformation lacumGroupInformation; LacumAccountInformation? lacumGroupInformation;
Future getLacumAccountInformation(String identificationNo) async { Future getLacumAccountInformation(String identificationNo) async {
hasError = false; hasError = false;
@ -38,7 +38,7 @@ class LacumService extends BaseService{
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();
body['IdentificationNo'] = identificationNo; body['IdentificationNo'] = identificationNo;
body['AccountNumber'] = "${lacumInformation.yahalaAccountNo}"; body['AccountNumber'] = "${lacumInformation!.yahalaAccountNo}";
body['IsDetailsRequired'] = true; body['IsDetailsRequired'] = true;
try { try {
@ -57,7 +57,7 @@ class LacumService extends BaseService{
Future makeAccountActivate() async { Future makeAccountActivate() async {
hasError = false; hasError = false;
super.error = ""; super.error = "";
int yahalaAccountNo = lacumInformation.yahalaAccountNo; int? yahalaAccountNo = lacumInformation?.yahalaAccountNo;
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();
body['CreatedBy'] = 103; body['CreatedBy'] = 103;
@ -80,7 +80,7 @@ class LacumService extends BaseService{
Future makeAccountDeactivate() async { Future makeAccountDeactivate() async {
hasError = false; hasError = false;
super.error = ""; super.error = "";
int yahalaAccountNo = lacumInformation.yahalaAccountNo; int? yahalaAccountNo = lacumInformation?.yahalaAccountNo;
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();
body['CreatedBy'] = 103; body['CreatedBy'] = 103;
@ -121,7 +121,7 @@ class LacumService extends BaseService{
try { try {
await baseAppClient.post(CREATE_LAKUM_ACCOUNT, await baseAppClient.post(CREATE_LAKUM_ACCOUNT,
onSuccess: (response, statusCode) async { onSuccess: (response, statusCode) async {
successMsg = LacumAccountInformation.fromJson(response).message; successMsg = LacumAccountInformation.fromJson(response).message!;
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
super.error = error; super.error = error;

@ -4,7 +4,8 @@ import 'package:diplomaticquarterapp/core/model/pharmacies/LacumAccountInformati
import 'lacum-service.dart'; import 'lacum-service.dart';
class LacumTransferService extends LacumService{ class LacumTransferService extends LacumService{
LacumAccountInformation lacumReceiverInformation;
LacumAccountInformation ?lacumReceiverInformation;
Future getLacumGroupDataBuAccountId(String accountId) async { Future getLacumGroupDataBuAccountId(String accountId) async {
hasError = false; hasError = false;
@ -33,14 +34,14 @@ class LacumTransferService extends LacumService{
super.error = ""; super.error = "";
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();
body['MobileNo'] = lacumGroupInformation.lakumInquiryInformationObjVersion.mobileNumber; body['MobileNo'] = lacumGroupInformation!.lakumInquiryInformationObjVersion!.mobileNumber;
body['UserName'] = lacumGroupInformation.lakumInquiryInformationObjVersion.memberName; body['UserName'] = lacumGroupInformation!.lakumInquiryInformationObjVersion!.memberName;
body['YaHalaSenderAccNumber'] = lacumGroupInformation.lakumInquiryInformationObjVersion.accountNumber; body['YaHalaSenderAccNumber'] = lacumGroupInformation!.lakumInquiryInformationObjVersion!.accountNumber;
body['Yahala_IdentificationNo'] = lacumGroupInformation.lakumInquiryInformationObjVersion.memberUniversalId; body['Yahala_IdentificationNo'] = lacumGroupInformation!.lakumInquiryInformationObjVersion!.memberUniversalId;
body['YaHalaPointsToTransfer'] = points; body['YaHalaPointsToTransfer'] = points;
body['YaHalaReceiverAccNumber'] = lacumReceiverInformation.lakumInquiryInformationObjVersion.accountNumber; body['YaHalaReceiverAccNumber'] = lacumReceiverInformation!.lakumInquiryInformationObjVersion!.accountNumber;
body['YaHalaReceiverMobileNumber'] = lacumReceiverInformation.lakumInquiryInformationObjVersion.mobileNumber; body['YaHalaReceiverMobileNumber'] = lacumReceiverInformation!.lakumInquiryInformationObjVersion!.mobileNumber;
body['YaHalaReceiverName'] = lacumReceiverInformation.lakumInquiryInformationObjVersion.memberName; body['YaHalaReceiverName'] = lacumReceiverInformation!.lakumInquiryInformationObjVersion!.memberName;
try { try {
await baseAppClient.post(TRANSFER_YAHALA_LOYALITY_POINTS, await baseAppClient.post(TRANSFER_YAHALA_LOYALITY_POINTS,

@ -14,10 +14,10 @@ class OrderPreviewService extends BaseService {
bool hasError = false; bool hasError = false;
String errorMsg = ''; String errorMsg = '';
List<Addresses> addresses = List(); List<Addresses> addresses = [];
LacumAccountInformation lacumInformation; LacumAccountInformation? lacumInformation;
LacumAccountInformation lacumGroupInformation; LacumAccountInformation? lacumGroupInformation;
List<OrderDetailModel> orderList = List(); List<OrderDetailModel> orderList = [];
Future getAddresses() async { Future getAddresses() async {
var customerId = await sharedPref.getString(PHARMACY_CUSTOMER_ID); var customerId = await sharedPref.getString(PHARMACY_CUSTOMER_ID);
@ -61,7 +61,7 @@ class OrderPreviewService extends BaseService {
var customerId = await sharedPref.getString(PHARMACY_CUSTOMER_ID); var customerId = await sharedPref.getString(PHARMACY_CUSTOMER_ID);
var customerGUID = await sharedPref.getObject(PHARMACY_CUSTOMER_GUID); var customerGUID = await sharedPref.getObject(PHARMACY_CUSTOMER_GUID);
if (customerId == null) return null; if (customerId == null) return Map();
Map<String, String> queryParams = {'shopping_cart_type': '1'}; Map<String, String> queryParams = {'shopping_cart_type': '1'};
dynamic localRes; dynamic localRes;
@ -162,7 +162,7 @@ class OrderPreviewService extends BaseService {
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();
body['IdentificationNo'] = identificationNo; body['IdentificationNo'] = identificationNo;
body['AccountNumber'] = "${lacumInformation.yahalaAccountNo}"; body['AccountNumber'] = "${lacumInformation!.yahalaAccountNo}";
try { try {
await baseAppClient.post(GET_LACUM_GROUP_INFORMATION, onSuccess: (response, statusCode) async { await baseAppClient.post(GET_LACUM_GROUP_INFORMATION, onSuccess: (response, statusCode) async {
@ -177,7 +177,7 @@ class OrderPreviewService extends BaseService {
} }
Future makeOrder(PaymentCheckoutData paymentCheckoutData, List<ShoppingCart> shoppingCarts, bool isLakumEnabled) async { Future makeOrder(PaymentCheckoutData paymentCheckoutData, List<ShoppingCart> shoppingCarts, bool isLakumEnabled) async {
paymentCheckoutData.address.isChecked = true; paymentCheckoutData.address!.isChecked = true;
hasError = false; hasError = false;
super.error = ""; super.error = "";
@ -191,22 +191,22 @@ class OrderPreviewService extends BaseService {
orderBody['pick_up_in_store'] = false; orderBody['pick_up_in_store'] = false;
orderBody['payment_method_system_name'] = "Payments.PayFort"; orderBody['payment_method_system_name'] = "Payments.PayFort";
if (paymentCheckoutData.shippingOption.shippingRateComputationMethodSystemName == "Shipping.Aramex") if (paymentCheckoutData.shippingOption!.shippingRateComputationMethodSystemName == "Shipping.Aramex")
orderBody['shipping_method'] = "Aramex Domestic"; orderBody['shipping_method'] = "Aramex Domestic";
else else
orderBody['shipping_method'] = "Fixed Price"; orderBody['shipping_method'] = "Fixed Price";
orderBody['shipping_rate_computation_method_system_name'] = paymentCheckoutData.shippingOption.shippingRateComputationMethodSystemName; orderBody['shipping_rate_computation_method_system_name'] = paymentCheckoutData.shippingOption!.shippingRateComputationMethodSystemName;
orderBody['customer_id'] = int.parse(customerId); orderBody['customer_id'] = int.parse(customerId);
orderBody['custom_values_xml'] = "PaymentOption:${getPaymentOptionName(paymentCheckoutData.paymentOption)}"; orderBody['custom_values_xml'] = "PaymentOption:${getPaymentOptionName(paymentCheckoutData.paymentOption!)}";
orderBody['shippingOption'] = paymentCheckoutData.shippingOption; orderBody['shippingOption'] = paymentCheckoutData.shippingOption;
orderBody['shipping_address'] = paymentCheckoutData.address; orderBody['shipping_address'] = paymentCheckoutData.address;
orderBody['lakum_amount'] = isLakumEnabled ? paymentCheckoutData.usedLakumPoints : 0; orderBody['lakum_amount'] = isLakumEnabled ? paymentCheckoutData.usedLakumPoints : 0;
List<Map<String, dynamic>> itemsList = List(); List<Map<String, dynamic>> itemsList = [];
shoppingCarts.forEach((item) { shoppingCarts.forEach((item) {
Map<String, dynamic> orderItemsBody = Map(); Map<String, dynamic> orderItemsBody = Map();
orderItemsBody['product_id'] = item.product.id; orderItemsBody['product_id'] = item.product!.id;
orderItemsBody['quantity'] = item.quantity; orderItemsBody['quantity'] = item.quantity;
itemsList.add(orderItemsBody); itemsList.add(orderItemsBody);
}); });
@ -256,7 +256,7 @@ class OrderPreviewService extends BaseService {
} }
} }
Future<LatLng> getDriverLocation(dynamic driverId) async { Future<LatLng?> getDriverLocation(dynamic driverId) async {
Map<String, dynamic> jsonBody = Map(); Map<String, dynamic> jsonBody = Map();
jsonBody['DriverID'] = driverId; jsonBody['DriverID'] = driverId;
@ -268,10 +268,12 @@ class OrderPreviewService extends BaseService {
double lon = locationObject['Longitude']; double lon = locationObject['Longitude'];
if (lat != null && lon != null) { if (lat != null && lon != null) {
coordinates = LatLng(lat, lon); coordinates = LatLng(lat, lon);
return coordinates;
} }
} }
}, onFailure: (String error, int statusCode) {}, body: jsonBody); }, onFailure: (String error, int statusCode) {
return LatLng(double.nan, double.nan);
return coordinates; //added by Amir
}, body: jsonBody);
} }
} }

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save