models updates -> 3.13.6

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

@ -2,7 +2,7 @@ import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/core/service/base_service.dart';
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;
Map<String, dynamic> body = Map();
body['LineItemNo'] = lineItemNo;
@ -20,7 +20,7 @@ class PrescriptionDeliveryService extends BaseService {
}, 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;
Map<String, dynamic> body = Map();
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';
class AncillaryOrdersService extends BaseService {
List<AncillaryOrdersListModel> _ancillaryLists = List();
List<AncillaryOrdersListModel> _ancillaryLists =[];
List<AncillaryOrdersListModel> get ancillaryLists => _ancillaryLists;
List<AncillaryOrdersListProcListModel> _ancillaryProcLists = List();
List<AncillaryOrdersListProcListModel> _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';
class AppointmentRateService extends BaseService {
List<AppoitmentRated> appointmentRatedList = List();
AppointmentDetails appointmentDetails;
List<AppoitmentRated> appointmentRatedList =[];
AppointmentDetails? appointmentDetails;
Future getIsLastAppointmentRatedList() async {
hasError = false;
@ -62,16 +62,16 @@ class AppointmentRateService extends BaseService {
"ProjectID": projectID,
"AppointmentNo": appointmentNo,
"Note": note,
"MobileNumber": authenticatedUserObject.user.mobileNumber,
"MobileNumber": authenticatedUserObject.user!.mobileNumber,
"AppointmentDate": appoDate,
"DoctorName": docName,
"ProjectName": projectName,
"COCTypeName": 1,
"PatientName": authenticatedUserObject.user.firstName + " " + authenticatedUserObject.user.lastName,
"PatientOutSA": authenticatedUserObject.user.outSA,
"PatientTypeID": authenticatedUserObject.user.patientType,
"PatientName": authenticatedUserObject.user!.firstName + " " + authenticatedUserObject.user!.lastName,
"PatientOutSA": authenticatedUserObject.user!.outSA,
"PatientTypeID": authenticatedUserObject.user!.patientType,
"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) {
@ -82,7 +82,7 @@ class AppointmentRateService extends BaseService {
AppoitmentRated get lastAppointmentRated {
if (appointmentRatedList.length > 0) return appointmentRatedList[appointmentRatedList.length - 1];
return null;
return AppoitmentRated();
}
deleteAppointmentRated(AppoitmentRated appointmentRated) {

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

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

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

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

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

@ -11,17 +11,17 @@ import '../base_service.dart';
class DeleteBabyService extends BaseService{
List<CreateNewBaby> createNewBabyModelList = List();
List<List_UserInformationModel> userModelList = List();
List<CreateNewUser_New> newUserModelList = List();
List<CreateNewBaby> createNewBabyModelList =[];
List<List_UserInformationModel> userModelList =[];
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;
await getUser();
Map<String, dynamic> body = Map.from(deleteChild.toJson());
Map<String, dynamic> body = Map.from(deleteChild!.toJson());
// body['CreatedBy'] = 102;
body['EditedBy'] = 102;
//body['BabyID'] = babyID;

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

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

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

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

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

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

@ -7,8 +7,8 @@ import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:flutter/cupertino.dart';
class EdOnlineServices extends BaseService {
List<TriageQuestionsModel> triageQuestionsModelList = List();
ErPatientShareModel erPatientShareModel;
List<TriageQuestionsModel> triageQuestionsModelList =[];
ErPatientShareModel? erPatientShareModel;
Future getQuestions() async {
hasError = false;
@ -36,25 +36,25 @@ class EdOnlineServices extends BaseService {
}, 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();
hasError = false;
Map<String, dynamic> body = Map();
List<Map> checklist = List();
List<Map> checklist =[];
body['ProjectID'] = 15;
body['ProjectId'] = projectId;
int riskScore = 0;
if (user.age > 14) {
selectedQuestions.forEach((element) {
int score = int.parse((element.adultPoints != "" ? element.adultPoints : "0"));
selectedQuestions!.forEach((element) {
int score = int.parse((element.adultPoints! != "" ? element.adultPoints! : "0"));
riskScore += score;
checklist.add(Map.from({"IsSelected": 1, "ParameterCode": element.parameterCode, "ParameterGroup": element.parameterGroup, "ParameterType": element.parameterType, "Score": score}));
});
} else {
selectedQuestions.forEach((element) {
int score = int.parse(element.pediaPoints);
selectedQuestions!.forEach((element) {
int score = int.parse(element.pediaPoints!);
riskScore += 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';
class AmService extends BaseService {
List<PatientERTransportationMethod> amModelList = List();
List<PatientAllPresOrders> patientAllPresOrdersList = List();
List<PatientERTransportationMethod> amModelList =[];
List<PatientAllPresOrders> patientAllPresOrdersList =[];
List<AmbulanceRequestOrdersModel> patientAmbulanceRequestOrdersList = List();
List<AmbulanceRequestOrdersModel> patientAmbulanceRequestOrdersList =[];
bool hasPendingOrder = false;
int pendingOrderID = 0;
String pendingOrderStatus = "";
String pendingOrderStatusAR = "";
PickUpRequestPresOrder pickUpRequestPresOrder;
PickUpRequestPresOrder? pickUpRequestPresOrder;
AmbulanceRequestOrdersModel pendingAmbulanceRequestOrder;
AmbulanceRequestOrdersModel? pendingAmbulanceRequestOrder;
Future getAllTransportationOrders() async {
hasError = false;
@ -51,9 +51,9 @@ class AmService extends BaseService {
patientAllPresOrdersList.add(order);
if (order.status == 1) {
hasPendingOrder = true;
pendingOrderID = order.iD;
pendingOrderStatus = order.description;
pendingOrderStatusAR = order.descriptionN;
pendingOrderID = order.iD!;
pendingOrderStatus = order.description!;
pendingOrderStatusAR = order.descriptionN!;
}
}
});
@ -109,7 +109,7 @@ class AmService extends BaseService {
}, body: body);
}
Future updatePressOrder({@required int presOrderID}) async {
Future updatePressOrder({required int presOrderID}) async {
hasError = false;
Map<String, dynamic> body = Map();
body['PresOrderID'] = presOrderID;
@ -123,7 +123,7 @@ class AmService extends BaseService {
}, body: body);
}
Future updatePressOrderRC({@required int presOrderID, @required int patientID}) async {
Future updatePressOrderRC({required int presOrderID, required int patientID}) async {
hasError = false;
Map<String, dynamic> body = Map();
body['Id'] = presOrderID;
@ -136,7 +136,7 @@ class AmService extends BaseService {
}, body: body);
}
Future insertERPressOrder({@required PatientER_RC patientER}) async {
Future insertERPressOrder({required PatientER_RC patientER}) async {
hasError = false;
var body = patientER.toJson();
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';
class ErService extends BaseService {
List<ProjectAvgERWaitingTime> projectAvgERWaitingTimeModelList = List();
List<ProjectAvgERWaitingTime> projectAvgERWaitingTimeModelList =[];
Map<String, dynamic> body = Map();
Future getProjectAvgERWaitingTimeOrders({int id, int projectID}) async {
Future getProjectAvgERWaitingTimeOrders({int? id, int? projectID}) async {
hasError = false;
if (id != null && projectID != null) {

@ -9,11 +9,11 @@ import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResu
import 'package:diplomaticquarterapp/uitl/utils.dart';
class FeedbackService extends BaseService {
List<COCItem> cOCItemList = List();
List<COCItem> cOCItemList =[];
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;
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';
class GeofencingServices extends BaseService {
List<GeoZonesResponseModel> geoZones = List();
List<GeoZonesResponseModel> geoZones =[];
bool testZones = true;
Future<List<GeoZonesResponseModel>> getAllGeoZones(GeoZonesRequestModel request) async {
@ -37,7 +37,7 @@ class GeofencingServices extends BaseService {
return geoZones;
}
LogGeoZoneResponseModel logResponse;
LogGeoZoneResponseModel? logResponse;
Future<LogGeoZoneResponseModel> logGeoZone(LogGeoZoneRequestModel request) async {
hasError = false;
@ -47,6 +47,6 @@ class GeofencingServices extends BaseService {
hasError = true;
return Future.error(error);
}, 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:flutter/material.dart';
import 'package:geolocator/geolocator.dart';
import 'package:progress_hud_v2/generated/i18n.dart';
class HospitalService extends BaseService {
List<HospitalsModel> _hospitals = List();
List<HospitalsModel> _hospitals =[];
List<HospitalsModel> get hospitals => _hospitals;
double _latitude;
double _longitude;
double? _latitude;
double? _longitude;
_getCurrentLocation() async {
if (await PermissionService.isLocationEnabled()) {
Geolocator.getLastKnownPosition().then((value) {
_latitude = value.latitude;
_latitude = value!.latitude;
_longitude = value.longitude;
}).catchError((e) {
_longitude = 0;
@ -32,7 +31,7 @@ class HospitalService extends BaseService {
if (Platform.isAndroid) {
Utils.showPermissionConsentDialog(AppGlobal.context, TranslationBase.of(AppGlobal.context).locationPermissionDialog, () {
Geolocator.getLastKnownPosition().then((value) {
_latitude = value.latitude;
_latitude = value!.latitude;
_longitude = value.longitude;
}).catchError((e) {
_longitude = 0;
@ -41,7 +40,7 @@ class HospitalService extends BaseService {
});
} else {
Geolocator.getLastKnownPosition().then((value) {
_latitude = value.latitude;
_latitude = value!.latitude;
_longitude = value.longitude;
}).catchError((e) {
_longitude = 0;

@ -15,9 +15,9 @@ import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:flutter/material.dart';
class InsuranceCardService extends BaseService {
List<InsuranceCardModel> _cardList = List();
List<InsuranceUpdateModel> _cardUpdated = List();
List<InsuranceApprovalModel> _insuranceApproval = List();
List<InsuranceCardModel> _cardList =[];
List<InsuranceUpdateModel> _cardUpdated =[];
List<InsuranceApprovalModel> _insuranceApproval =[];
List<InsuranceCardModel> get cardList => _cardList;
@ -25,8 +25,8 @@ class InsuranceCardService extends BaseService {
List<InsuranceApprovalModel> get insuranceApproval => _insuranceApproval;
InsuranceCardDetailsModel insuranceCardDetails;
List<InsuranceCardDetailsModel> insuranceCardDetailsList = List();
InsuranceCardDetailsModel? insuranceCardDetails;
List<InsuranceCardDetailsModel> insuranceCardDetailsList =[];
bool isHaveInsuranceCard = false;
GetAllSharedRecordsByStatusResponse getAllSharedRecordsByStatusResponse = GetAllSharedRecordsByStatusResponse();
@ -68,7 +68,7 @@ class InsuranceCardService extends BaseService {
}, body: Map());
}
Future getInsuranceApproval({int appointmentNo}) async {
Future getInsuranceApproval({required int appointmentNo}) async {
hasError = false;
if (appointmentNo != null) {
_requestInsuranceApprovalModel.appointmentNo = appointmentNo;
@ -142,7 +142,7 @@ class InsuranceCardService extends BaseService {
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 = "";
hasError = false;
insuranceCardDetails = null;
@ -220,7 +220,7 @@ class InsuranceCardService extends BaseService {
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 = "";
Map<String, dynamic> body = Map();
body['PatientID'] = patientID;

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

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

@ -6,14 +6,14 @@ import 'package:diplomaticquarterapp/core/model/my_trakers/blood_pressur/YearBlo
import 'package:diplomaticquarterapp/core/service/base_service.dart';
class BloodPressureService extends BaseService {
List<MonthBloodPressureResultAverage> monthDiabtectResultAverageList = List();
List<WeekBloodPressureResultAverage> weekDiabtectResultAverageList = List();
List<YearBloodPressureResultAverage> yearDiabtecResultAverageList = List();
List<MonthBloodPressureResultAverage> monthDiabtectResultAverageList =[];
List<WeekBloodPressureResultAverage> weekDiabtectResultAverageList =[];
List<YearBloodPressureResultAverage> yearDiabtecResultAverageList =[];
///Result
List<BloodPressureResult> monthDiabtecPatientResult = List();
List<BloodPressureResult> weekDiabtecPatientResult = List();
List<BloodPressureResult> yearDiabtecPatientResult = List();
List<BloodPressureResult> monthDiabtecPatientResult =[];
List<BloodPressureResult> weekDiabtecPatientResult =[];
List<BloodPressureResult> yearDiabtecPatientResult =[];
Future getBloodSugar() async {
hasError = false;
@ -84,10 +84,10 @@ class BloodPressureService extends BaseService {
}
addDiabtecResult(
{String bloodPressureDate,
String diastolicPressure,
String systolicePressure,
int measuredArm}) async {
{String? bloodPressureDate,
String? diastolicPressure,
String? systolicePressure,
int? measuredArm}) async {
hasError = false;
super.error = "";
@ -109,11 +109,11 @@ class BloodPressureService extends BaseService {
}
updateDiabtecResult(
{String bloodPressureDate,
String diastolicPressure,
String systolicePressure,
int lineItemNo,
int measuredArm}) async {
{String? bloodPressureDate,
String? diastolicPressure,
String? systolicePressure,
int? lineItemNo,
int? measuredArm}) async {
hasError = false;
super.error = "";
@ -135,7 +135,7 @@ class BloodPressureService extends BaseService {
}, body: body);
}
Future deactivateDiabeticStatus({int lineItemNo }) async {
Future deactivateDiabeticStatus({int? lineItemNo }) async {
hasError = false;
super.error = "";
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';
class BloodSugarService extends BaseService {
List<MonthDiabtectResultAverage> monthDiabtectResultAverageList = List();
List<WeekDiabtectResultAverage> weekDiabtectResultAverageList = List();
List<YearDiabtecResultAverage> yearDiabtecResultAverageList = List();
List<MonthDiabtectResultAverage> monthDiabtectResultAverageList =[];
List<WeekDiabtectResultAverage> weekDiabtectResultAverageList =[];
List<YearDiabtecResultAverage> yearDiabtecResultAverageList =[];
///Result
List<DiabtecPatientResult> monthDiabtecPatientResult = List();
List<DiabtecPatientResult> weekDiabtecPatientResult = List();
List<DiabtecPatientResult> yearDiabtecPatientResult = List();
List<DiabtecPatientResult> monthDiabtecPatientResult =[];
List<DiabtecPatientResult> weekDiabtecPatientResult =[];
List<DiabtecPatientResult> yearDiabtecPatientResult =[];
Future getBloodSugar() async {
hasError = false;
@ -67,14 +67,14 @@ class BloodSugarService extends BaseService {
}, body: Map());
}
addDiabtecResult({String bloodSugerDateChart, String bloodSugerResult, String diabtecUnit, int measuredTime}) async {
addDiabtecResult({String? bloodSugerDateChart, String? bloodSugerResult, String? diabtecUnit, int? measuredTime}) async {
hasError = false;
super.error = "";
Map<String, dynamic> body = Map();
body['BloodSugerDateChart'] = bloodSugerDateChart;
body['BloodSugerResult'] = bloodSugerResult;
body['DiabtecUnit'] = diabtecUnit;
body['MeasuredTime'] = measuredTime + 1;
body['MeasuredTime'] = measuredTime! + 1;
body['isDentalAllowedBackend'] = false;
await baseAppClient.post(ADD_DIABTEC_RESULT, onSuccess: (response, statusCode) async {}, onFailure: (String error, int statusCode) {
hasError = true;
@ -82,15 +82,15 @@ class BloodSugarService extends BaseService {
}, 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;
super.error = "";
Map<String, dynamic> body = Map();
body['BloodSugerResult'] = bloodSugerResult;
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['MeasuredTime'] = measuredTime + 1;
body['MeasuredTime'] = measuredTime! + 1;
body['LineItemNo'] = lineItemNo;
await baseAppClient.post(UPDATE_DIABETIC_RESULT, onSuccess: (response, statusCode) async {}, onFailure: (String error, int statusCode) {
hasError = true;
@ -110,7 +110,7 @@ class BloodSugarService extends BaseService {
}, body: body);
}
Future deactivateDiabeticStatus({int lineItemNo}) async {
Future deactivateDiabeticStatus({int? lineItemNo}) async {
hasError = false;
super.error = "";
Map<String, dynamic> body = Map();

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

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

@ -8,10 +8,10 @@ import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
class AskDoctorService extends BaseService {
List<AskDoctorReqTypes> askDoctorReqTypes = List();
List<DoctorResponse> doctorResponseList = List();
List<AskDoctorReqTypes> askDoctorReqTypes =[];
List<DoctorResponse> doctorResponseList =[];
Future getCallInfoHoursResult({int projectId, int doctorId}) async {
Future getCallInfoHoursResult({int? projectId, int? doctorId}) async {
hasError = false;
Map<String, dynamic> body = Map();
body['isDentalAllowedBackend'] = false;
@ -76,7 +76,7 @@ class AskDoctorService extends BaseService {
}, body: body);
}
Future updateReadStatus({int transactionNo}) async {
Future updateReadStatus({int? transactionNo}) async {
hasError = false;
Map<String, dynamic> body = Map();
body['isDentalAllowedBackend'] = false;
@ -89,10 +89,10 @@ class AskDoctorService extends BaseService {
}, body: body);
}
Future sendRequestLOV({DoctorList doctorList, String requestType, String remark}) async {
Future sendRequestLOV({DoctorList? doctorList, String? requestType, String? remark}) async {
hasError = false;
Map<String, dynamic> body = Map();
body['ProjectID'] = doctorList.projectID;
body['ProjectID'] = doctorList!.projectID;
body['SetupID'] = doctorList.setupID;
body['DoctorID'] = doctorList.doctorID;
body['PatientMobileNumber'] = user.mobileNumber;
@ -108,7 +108,7 @@ class AskDoctorService extends BaseService {
body['isDentalAllowedBackend'] = false;
body['AppointmentNo'] = doctorList.appointmentNo;
body['ClinicID'] = doctorList.clinicID;
body['QuestionType'] = num.parse(requestType);
body['QuestionType'] = num.parse(requestType!);
body['RequestType'] = num.parse(requestType);
body['RequestTypeID'] = num.parse(requestType);
@ -118,7 +118,7 @@ class AskDoctorService extends BaseService {
}, 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;
dynamic localRes;
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';
class LabsService extends BaseService {
List<PatientLabOrders> patientLabOrdersList = List();
List<PatientLabOrders> patientLabOrdersList =[];
String labReportPDF = "";
@ -30,16 +30,16 @@ class LabsService extends BaseService {
RequestPatientLabSpecialResult _requestPatientLabSpecialResult = RequestPatientLabSpecialResult();
List<PatientLabSpecialResult> patientLabSpecialResult = List();
List<LabResult> labResultList = List();
List<LabOrderResult> labOrdersResultsList = List();
List<PatientLabSpecialResult> patientLabSpecialResult =[];
List<LabResult> labResultList =[];
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;
_requestPatientLabSpecialResult.projectID = projectID;
_requestPatientLabSpecialResult.clinicID = clinicID;
_requestPatientLabSpecialResult.invoiceNo = isVidaPlus ? "0" : invoiceNo;
_requestPatientLabSpecialResult.invoiceNo = isVidaPlus! ? "0" : invoiceNo;
_requestPatientLabSpecialResult.invoiceNoVP = isVidaPlus ? invoiceNo : "0";
_requestPatientLabSpecialResult.orderNo = orderNo;
@ -56,12 +56,12 @@ class LabsService extends BaseService {
}, body: _requestPatientLabSpecialResult.toJson());
}
Future getPatientLabResult({PatientLabOrders patientLabOrder, bool isVidaPlus}) async {
Future getPatientLabResult({PatientLabOrders? patientLabOrder, bool? isVidaPlus}) async {
hasError = false;
Map<String, dynamic> body = Map();
body['InvoiceNo_VP'] = isVidaPlus ? patientLabOrder.invoiceNo : "0";
body['InvoiceNo'] = isVidaPlus ? "0" : patientLabOrder.invoiceNo;
body['OrderNo'] = patientLabOrder.orderNo;
body['InvoiceNo_VP'] = isVidaPlus! ? patientLabOrder!.invoiceNo : "0";
body['InvoiceNo'] = isVidaPlus ? "0" : patientLabOrder!.invoiceNo;
body['OrderNo'] = patientLabOrder!.orderNo;
body['isDentalAllowedBackend'] = false;
body['SetupID'] = patientLabOrder.setupID;
body['ProjectID'] = patientLabOrder.projectID;
@ -177,11 +177,11 @@ class LabsService extends BaseService {
return Future.value(localRes);
}
Future getPatientLabOrdersResults({PatientLabOrders patientLabOrder, String procedure}) async {
Future getPatientLabOrdersResults({PatientLabOrders? patientLabOrder, String? procedure}) async {
hasError = false;
Map<String, dynamic> body = Map();
body['InvoiceNo'] = "0";
body['InvoiceNo_VP'] = patientLabOrder.invoiceNo;
body['InvoiceNo_VP'] = patientLabOrder!.invoiceNo;
body['OrderNo'] = patientLabOrder.orderNo;
body['isDentalAllowedBackend'] = false;
body['SetupID'] = patientLabOrder.setupID;
@ -201,17 +201,17 @@ class LabsService extends BaseService {
RequestSendLabReportEmail _requestSendLabReportEmail = RequestSendLabReportEmail();
Future sendLabReportEmail({PatientLabOrders patientLabOrder, AuthenticatedUser userObj, bool isVidaPlus, bool isDownload = false}) async {
_requestSendLabReportEmail.projectID = patientLabOrder.projectID;
Future sendLabReportEmail({PatientLabOrders? patientLabOrder, AuthenticatedUser? userObj, bool isVidaPlus = false, bool isDownload = false}) async {
_requestSendLabReportEmail.projectID = patientLabOrder!.projectID;
_requestSendLabReportEmail.invoiceNo = isVidaPlus ? "0" : patientLabOrder.invoiceNo;
_requestSendLabReportEmail.invoiceNoVP = isVidaPlus ? patientLabOrder.invoiceNo : "0";
_requestSendLabReportEmail.doctorName = patientLabOrder.doctorName;
_requestSendLabReportEmail.clinicName = patientLabOrder.clinicDescription;
_requestSendLabReportEmail.patientName = userObj.firstName + " " + userObj.lastName;
_requestSendLabReportEmail.patientName = userObj!.firstName + " " + userObj.lastName;
_requestSendLabReportEmail.patientIditificationNum = userObj.patientIdentificationNo;
_requestSendLabReportEmail.dateofBirth = userObj.dateofBirth;
_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.projectName = patientLabOrder.projectName;
_requestSendLabReportEmail.setupID = patientLabOrder.setupID;

@ -8,8 +8,8 @@ import 'package:diplomaticquarterapp/pages/MyAppointments/models/DoctorScheduleR
import 'package:flutter/cupertino.dart';
class MedicalService extends BaseService {
List<AppoitmentAllHistoryResultList> appoitmentAllHistoryResultList = List();
List<DoctorScheduleResponse> doctorScheduleResponse = List();
List<AppoitmentAllHistoryResultList> appoitmentAllHistoryResultList =[];
List<DoctorScheduleResponse> doctorScheduleResponse =[];
List<String> freeSlots = [];
getAppointmentHistory({bool isActiveAppointment = false}) async {
hasError = false;
@ -39,7 +39,7 @@ class MedicalService extends BaseService {
}
}
addAmbulanceRequest({@required PatientER patientER}) async {
addAmbulanceRequest({required PatientER patientER}) async {
hasError = false;
super.error = "";
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';
class MyBalanceService extends BaseService {
List<PatientAdvanceBalanceAmount> patientAdvanceBalanceAmountList = List();
List<PatientAdvanceBalanceAmount> patientAdvanceBalanceAmountList =[];
dynamic totalAdvanceBalanceAmount;
List<PatientInfo> patientInfoList = List();
List<PatientInfo> patientInfoList =[];
GetAllSharedRecordsByStatusResponse getAllSharedRecordsByStatusResponse =
GetAllSharedRecordsByStatusResponse();
PatientInfoAndMobileNumber patientInfoAndMobileNumber;
String logInTokenID;
String verificationCode;
PatientInfoAndMobileNumber? patientInfoAndMobileNumber;
String? logInTokenID;
String? verificationCode;
String updatedRegisterBloodMessage = "";
AuthenticatedUserObject authenticatedUserObject =
locator<AuthenticatedUserObject>();
MyBalanceService() {
// getFamilyFiles();
}
// MyBalanceService() {
// // getFamilyFiles();
// }
getPatientAdvanceBalanceAmount() async {
hasError = false;
@ -48,7 +48,7 @@ class MyBalanceService extends BaseService {
}, body: Map());
}
getPatientInfoByPatientID({String id}) async {
getPatientInfoByPatientID({required String id}) async {
hasError = false;
super.error = "";
Map<String, dynamic> body = Map();
@ -72,7 +72,7 @@ class MyBalanceService extends BaseService {
Map<String, dynamic> body = Map();
body['isDentalAllowedBackend'] = false;
body['MobileNo'] = advanceModel.mobileNumber;
body['ProjectID'] = advanceModel.hospitalsModel.iD;
body['ProjectID'] = advanceModel.hospitalsModel!.iD;
body['PatientID'] = advanceModel.fileNumber;
await baseAppClient.post(GET_PATIENT_INFO_BY_ID_AND_MOBILE_NUMBER,
@ -87,7 +87,7 @@ class MyBalanceService extends BaseService {
}, body: body);
}
sendActivationCodeForAdvancePayment({int patientID, int projectID}) async {
sendActivationCodeForAdvancePayment({required int patientID, required int projectID}) async {
hasError = false;
super.error = "";
Map<String, dynamic> body = Map();
@ -106,7 +106,7 @@ class MyBalanceService extends BaseService {
}, body: body);
}
checkActivationCodeForAdvancePayment({String activationCode}) async {
checkActivationCodeForAdvancePayment({required String activationCode}) async {
hasError = false;
super.error = "";
Map<String, dynamic> body = Map();
@ -141,7 +141,7 @@ class MyBalanceService extends BaseService {
} catch (error) {
print(error);
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';
class MyDoctorService extends BaseService {
List<DoctorList> patientDoctorAppointmentList = List();
DoctorProfile doctorProfile;
DoctorList doctorList;
List<DoctorList> patientDoctorAppointmentList =[];
DoctorProfile? doctorProfile;
DoctorList? doctorList;
DoctorRating doctorRating = DoctorRating();
RequestPatientDoctorAppointment patientDoctorAppointmentRequest =
@ -49,7 +49,7 @@ class MyDoctorService extends BaseService {
);
Future getDoctorProfileAndRating(
{int doctorId, int clinicID, int projectID}) async {
{required int doctorId, required int clinicID, required int projectID}) async {
///GET DOCTOR PROFILE
_requestDoctorProfile.doctorID = doctorId;
_requestDoctorProfile.clinicID = clinicID;
@ -59,10 +59,10 @@ class MyDoctorService extends BaseService {
onSuccess: (dynamic response, int statusCode) {
doctorProfile = DoctorProfile.fromJson(response['DoctorProfileList'][0]);
doctorList = DoctorList.fromJson(response['DoctorProfileList'][0]);
doctorList.clinicName = doctorProfile.clinicDescription;
doctorList.doctorTitle = doctorProfile.doctorTitleForProfile;
doctorList.name = doctorProfile.doctorName;
doctorList.projectName = doctorProfile.projectName;
doctorList!.clinicName = doctorProfile!.clinicDescription!;
doctorList!.doctorTitle = doctorProfile!.doctorTitleForProfile!;
doctorList!.name = doctorProfile!.doctorName!;
doctorList!.projectName = doctorProfile!.projectName!;
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;

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

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

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

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

@ -4,13 +4,13 @@ import 'package:diplomaticquarterapp/core/model/vital_sign/vital_sign_res_model.
import '../base_service.dart';
class VitalSignService extends BaseService {
List<VitalSignResModel> vitalSignResModelList = List();
List<VitalSignResModel> vitalSignResModelList =[];
String weightKg = "";
String heightCm = "";
String bloadType = "";
Future getPatientRadOrders({int appointmentNo, int projectID}) async {
Future getPatientRadOrders({required int appointmentNo, required int projectID}) async {
hasError = false;
Map<String, dynamic> body = Map();
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';
class NotificationService extends BaseService {
List<GetNotificationsResponseModel> notificationsList = List();
List<GetNotificationsResponseModel> notificationsList =[];
Future getAllNotifications(GetNotificationsRequestModel getNotificationsRequestModel ) async {
hasError = false;

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

@ -24,7 +24,7 @@ import 'package:flutter/cupertino.dart';
Map<String, String> packagesAuthHeader = {};
class OffersAndPackagesServices extends BaseService {
AuthenticatedUser patientUser;
AuthenticatedUser? patientUser;
List<PackagesCategoriesResponseModel> categoryList = [];
List<OfferProject> projectsList = [];
List<PackagesResponseModel> productList = [];
@ -35,14 +35,14 @@ class OffersAndPackagesServices extends BaseService {
List<PackagesResponseModel> ordersHistory = [];
List<PackagesCartItemsResponseModel> cartItemList = [];
List<HospitalsModel> _hospitals = [];
List<HospitalsModel> get hospitals => _hospitals;
String cartItemCount = "";
PackagesCustomerResponseModel customer;
PackagesCustomerResponseModel? customer;
Future<List<PackagesCategoriesResponseModel>> getAllCategories(OffersCategoriesRequestModel request) async {
if(categoryList.isNotEmpty)
return categoryList;
if (categoryList.isNotEmpty) return categoryList;
var url = EXA_CART_API_BASE_URL + PACKAGES_CATEGORIES;
await baseAppClient.simpleGet(url, headers: packagesAuthHeader, onSuccess: (dynamic stringResponse, int statusCode) {
@ -58,24 +58,23 @@ class OffersAndPackagesServices extends BaseService {
}
Future<List<OfferProject>> getAllStores() async {
if(projectsList.isNotEmpty)
return projectsList;
if (projectsList.isNotEmpty) return projectsList;
var url = EXA_CART_API_BASE_URL + PACKAGES_STORES;
await baseAppClient.simpleGet(url, headers: packagesAuthHeader, onSuccess: (dynamic stringResponse, int statusCode) {
if (statusCode == 200) {
var jsonResponse = json.decode(stringResponse);
final response = OfferProjectsResponseModel.fromJson(jsonResponse);
projectsList = response.project;
projectsList = response.project!;
}
}, onFailure: (String error, int statusCode) {
throw error;
}, queryParams: {'fields' : 'id,name'});
}, queryParams: {'fields': 'id,name'});
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;
productList = [];
var url = EXA_CART_API_BASE_URL + PACKAGES_PRODUCTS;
@ -91,7 +90,7 @@ class OffersAndPackagesServices extends BaseService {
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;
tamaraPaymentOptions.clear();
@ -110,7 +109,7 @@ class OffersAndPackagesServices extends BaseService {
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;
await baseAppClient.simpleGet(url, headers: packagesAuthHeader, onSuccess: (dynamic stringResponse, int statusCode) {
latestOffersList.clear();
@ -127,7 +126,7 @@ class OffersAndPackagesServices extends BaseService {
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;
await baseAppClient.simpleGet(url, headers: packagesAuthHeader, onSuccess: (dynamic stringResponse, int statusCode) {
bestSellerList.clear();
@ -144,7 +143,7 @@ class OffersAndPackagesServices extends BaseService {
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;
await baseAppClient.simpleGet(url, headers: packagesAuthHeader, onSuccess: (dynamic stringResponse, int statusCode) {
if (statusCode == 200) {
@ -160,7 +159,7 @@ class OffersAndPackagesServices extends BaseService {
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 totalCalls = 2;
@ -184,7 +183,7 @@ class OffersAndPackagesServices extends BaseService {
if (patientUser != null) {
customer = await getCurrentCustomer(context: context, showLoading: showLoading);
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
// --------------------
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);
customer = null;
Future errorThrow;
Future? errorThrow;
_showLoading(context, showLoading);
var url = EXA_CART_API_BASE_URL + PACKAGES_CUSTOMER;
@ -235,11 +234,11 @@ class OffersAndPackagesServices extends BaseService {
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);
_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) {
var jsonResponse = json.decode(stringResponse);
var customerJson = jsonResponse['customers'].first;
@ -249,18 +248,18 @@ class OffersAndPackagesServices extends BaseService {
});
_hideLoading(context, showLoading);
return customer;
return customer!;
}
// --------------------
// 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;
cartItemList.clear();
_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;
await baseAppClient.simpleGet(url, headers: packagesAuthHeader, onSuccess: (dynamic stringResponse, int statusCode) {
_hideLoading(context, showLoading);
@ -269,20 +268,20 @@ class OffersAndPackagesServices extends BaseService {
jsonResponse['shopping_carts'].forEach((json) {
cartItemList.add(PackagesCartItemsResponseModel.fromJson(json));
});
return jsonResponse;
}, onFailure: (String error, int statusCode) {
_hideLoading(context, showLoading);
log(error);
errorThrow = Future.error({"error": error, "statusCode": statusCode});
return errorThrow;
}, 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;
ResponseModel<PackagesCartItemsResponseModel> response;
request.customer_id = customer.id;
request.customer_id = customer!.id;
_showLoading(context, showLoading);
var url = EXA_CART_API_BASE_URL + PACKAGES_SHOPPING_CART;
@ -293,58 +292,57 @@ class OffersAndPackagesServices extends BaseService {
var jsonCartItem = jsonResponse["shopping_carts"][0];
response = ResponseModel(status: true, data: PackagesCartItemsResponseModel.fromJson(jsonCartItem), error: null);
cartItemCount = (jsonResponse['count'] ?? 0).toString();
return response;
}, onFailure: (String error, int statusCode) {
_hideLoading(context, showLoading);
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;
_showLoading(context, showLoading);
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);
var jsonResponse = json.decode(stringResponse);
return jsonResponse;
}, onFailure: (String error, int statusCode) {
_hideLoading(context, showLoading);
log(error);
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;
_showLoading(context, showLoading);
var url = EXA_CART_API_BASE_URL + PACKAGES_SHOPPING_CART + '/$cartItemID';
await baseAppClient.simpleDelete(url, headers: packagesAuthHeader, onSuccess: (dynamic stringResponse, int statusCode) {
_hideLoading(context, showLoading);
return true;
}, onFailure: (String error, int statusCode) {
_hideLoading(context, showLoading);
log(error);
errorThrow = Future.error({"error": error, "statusCode": statusCode});
return errorThrow;
});
return errorThrow ?? true;
}
// --------------------
// 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;
Map<dynamic, dynamic> jsonBody = {
"customer_id": customer.id,
"customer_id": customer!.id,
"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 = {'order': jsonBody};
@ -359,25 +357,25 @@ class OffersAndPackagesServices extends BaseService {
var jsonResponse = json.decode(stringResponse);
order_id = jsonResponse['orders'][0]['id'];
return order_id;
}, onFailure: (String error, int statusCode) {
_hideLoading(context, showLoading);
log(error);
errorThrow = Future.error(error);
return errorThrow;
});
return errorThrow ?? order_id;
}
// --------------------
// 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)
// return ordersHistory;
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
Map<String, dynamic> queryParams ={};
Map<String, dynamic> queryParams = {};
queryParams['fields'] = 'id,product,utilize_by_vida,valid_until_date_utc,order_id';
queryParams['page'] = "1";
queryParams['limit'] = "100";
@ -392,17 +390,16 @@ class OffersAndPackagesServices extends BaseService {
final order_items = jsonResponse["order_items"] as List;
ordersHistory = order_items.map((e) => PackagesResponseModel().fromJson(e['product'])).toList();
print(ordersHistory);
return ordersHistory;
}, onFailure: (String error, int statusCode) {
_hideLoading(context, showLoading);
log(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;
ResponseModel<PackagesOrderResponseModel> response;
@ -414,12 +411,12 @@ class OffersAndPackagesServices extends BaseService {
var jsonResponse = json.decode(stringResponse);
var jsonOrder = jsonResponse['orders'][0];
response = ResponseModel(status: true, data: PackagesOrderResponseModel.fromJson(jsonOrder));
return response;
}, onFailure: (String error, int statusCode) {
_hideLoading(context, showLoading);
errorThrow = Future.error(ResponseModel(status: false, error: error));
return errorThrow;
}, queryParams: null);
return errorThrow ?? response;
}
Future getHospitals({bool isResBasedOnLoc = true}) async {
@ -429,18 +426,16 @@ class OffersAndPackagesServices extends BaseService {
body['IsOnlineCheckIn'] = isResBasedOnLoc;
body['PatientOutSA'] = 0;
await baseAppClient.post(GET_PROJECT,
onSuccess: (dynamic response, int statusCode) {
_hospitals.clear();
response['ListProject'].forEach((hospital) {
_hospitals.add(HospitalsModel.fromJson(hospital));
});
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: body);
await baseAppClient.post(GET_PROJECT, onSuccess: (dynamic response, int statusCode) {
_hospitals.clear();
response['ListProject'].forEach((hospital) {
_hospitals.add(HospitalsModel.fromJson(hospital));
});
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: body);
}
}
_showLoading(BuildContext context, bool flag) {

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

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

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

@ -14,10 +14,10 @@ class OrderPreviewService extends BaseService {
bool hasError = false;
String errorMsg = '';
List<Addresses> addresses = List();
LacumAccountInformation lacumInformation;
LacumAccountInformation lacumGroupInformation;
List<OrderDetailModel> orderList = List();
List<Addresses> addresses = [];
LacumAccountInformation? lacumInformation;
LacumAccountInformation? lacumGroupInformation;
List<OrderDetailModel> orderList = [];
Future getAddresses() async {
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 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'};
dynamic localRes;
@ -162,7 +162,7 @@ class OrderPreviewService extends BaseService {
Map<String, dynamic> body = Map();
body['IdentificationNo'] = identificationNo;
body['AccountNumber'] = "${lacumInformation.yahalaAccountNo}";
body['AccountNumber'] = "${lacumInformation!.yahalaAccountNo}";
try {
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 {
paymentCheckoutData.address.isChecked = true;
paymentCheckoutData.address!.isChecked = true;
hasError = false;
super.error = "";
@ -191,22 +191,22 @@ class OrderPreviewService extends BaseService {
orderBody['pick_up_in_store'] = false;
orderBody['payment_method_system_name'] = "Payments.PayFort";
if (paymentCheckoutData.shippingOption.shippingRateComputationMethodSystemName == "Shipping.Aramex")
if (paymentCheckoutData.shippingOption!.shippingRateComputationMethodSystemName == "Shipping.Aramex")
orderBody['shipping_method'] = "Aramex Domestic";
else
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['custom_values_xml'] = "PaymentOption:${getPaymentOptionName(paymentCheckoutData.paymentOption)}";
orderBody['custom_values_xml'] = "PaymentOption:${getPaymentOptionName(paymentCheckoutData.paymentOption!)}";
orderBody['shippingOption'] = paymentCheckoutData.shippingOption;
orderBody['shipping_address'] = paymentCheckoutData.address;
orderBody['lakum_amount'] = isLakumEnabled ? paymentCheckoutData.usedLakumPoints : 0;
List<Map<String, dynamic>> itemsList = List();
List<Map<String, dynamic>> itemsList = [];
shoppingCarts.forEach((item) {
Map<String, dynamic> orderItemsBody = Map();
orderItemsBody['product_id'] = item.product.id;
orderItemsBody['product_id'] = item.product!.id;
orderItemsBody['quantity'] = item.quantity;
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();
jsonBody['DriverID'] = driverId;
@ -268,10 +268,12 @@ class OrderPreviewService extends BaseService {
double lon = locationObject['Longitude'];
if (lat != null && lon != null) {
coordinates = LatLng(lat, lon);
return coordinates;
}
}
}, onFailure: (String error, int statusCode) {}, body: jsonBody);
return coordinates;
}, onFailure: (String error, int statusCode) {
return LatLng(double.nan, double.nan);
//added by Amir
}, body: jsonBody);
}
}

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

Loading…
Cancel
Save