Merge branch 'development' of https://gitlab.com/Cloud_Solution/diplomatic-quarter into sultan-patientapp

merge-requests/378/head
Sultan Khan 3 years ago
commit 1726f8cc11

@ -14,7 +14,7 @@ const PACKAGES_SHOPPING_CART = '/api/shopping_cart_items';
const PACKAGES_ORDERS = '/api/orders';
const BASE_URL = 'https://uat.hmgwebservices.com/';
//const BASE_URL = 'https://hmgwebservices.com/';
// const BASE_URL = 'https://hmgwebservices.com/';
// Pharmacy UAT URLs
const BASE_PHARMACY_URL = 'https://uat.hmgwebservices.com/epharmacy/api/';
@ -338,6 +338,9 @@ const GET_PATIENT_HEALTH_STATS =
const SEND_CHECK_IN_NFC_REQUEST =
'Services/Patients.svc/REST/Patient_CheckAppointmentValidation_ForNFC';
const HAS_DENTAL_PLAN =
'Services/Doctors.svc/REST/Dental_IsPatientHasOnGoingEstimation';
//URL to get medicine and pharmacies list
const CHANNEL = 3;
const GENERAL_ID = 'Cs2020@2016\$2958';
@ -505,7 +508,8 @@ const GET_DOCTOR_LIST_BY_TIME = "Services/Doctors.svc/REST/SearchDoctorsByTime";
const PHARMACY_AUTORZIE_CUSTOMER = "AutorizeCustomer";
const PHARMACY_VERIFY_CUSTOMER = "VerifyCustomer";
const PHARMACY_GET_COUNTRY = "countries";
const PHARMACY_CREATE_CUSTOMER = "epharmacy/api/CreateCustomer";
// const PHARMACY_CREATE_CUSTOMER = "epharmacy/api/CreateCustomer";
const PHARMACY_CREATE_CUSTOMER = "epharmacy/api/getorcreateCustomer";
const GET_PHARMACY_BANNER = "promotionbanners";
const GET_PHARMACY_TOP_MANUFACTURER = "topmanufacturer";
const GET_PHARMACY_BEST_SELLER_PRODUCT = "bestsellerproducts";

@ -378,7 +378,7 @@ const Map localizedValues = {
"companyName": {"en": "Company Name ", "ar": "اسم الشركة: "},
"receiptOn": {"en": "Receipt on: ", "ar": "تاريخ الفاتورة: "},
"expiryDate": {"en": "Expiry Date: ", "ar": "تاريخ الانتهاء: "},
"procedureName": {"en": "Procedure Name", "ar": "اسم الاجراء"},
"procedureName": {"en": "Procedure Name:", "ar": "اسم الاجراء:"},
"procedureStatus": {"en": "Procedure Status: ", "ar": "حالة الاجراء"},
"usageStatus": {"en": "Usage Status", "ar": "جالة الاستخدام"},
"unusedCount": {"en": "Unused Count: ", "ar": "غير مستخدم: "},
@ -2207,5 +2207,18 @@ const Map localizedValues = {
"13": {"en": "Vaccines Schedule", "ar": "جدول التطعيمات"},
"14": {"en": "Health Calculators", "ar": "حاسبات صحية"},
"15": {"en": "Other Services", "ar": "خدمات أخرى"}
}
},
"continue-plan": {
"en": "Continue with the treatment plan?",
"ar": "إكمال الخطة العلاجية؟"
},
"dental-procedure-list": {
"en": "Dental Procedures for this Appointment: ",
"ar": "إجراءات الأسنان لهذا الموعد:"
},
"time-needed": {"en": "Time Needed:", "ar": "الوقت اللازم:"},
"total-time-needed": {
"en": "Total Appointment Time:",
"ar": "وقت المواعيد الكلي:"
},
};

@ -1,247 +1,251 @@
class RecommendedProductModel {
List<Products> products;
RecommendedProductModel({this.products});
RecommendedProductModel.fromJson(Map<String, dynamic> json) {
if (json['products'] != null) {
products = new List<Products>();
json['products'].forEach((v) {
products.add(new Products.fromJson(v));
});
}
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
if (this.products != null) {
data['products'] = this.products.map((v) => v.toJson()).toList();
}
return data;
}
}
class Products {
String id;
dynamic id;
bool visibleIndividually;
String name;
String namen;
String shortDescription;
String shortDescriptionn;
String fullDescription;
String fullDescriptionn;
dynamic name;
dynamic namen;
List<LocalizedNames> localizedNames;
dynamic shortDescription;
dynamic shortDescriptionn;
dynamic fullDescription;
dynamic fullDescriptionn;
bool markasNew;
bool showOnHomePage;
dynamic metaKeywords;
dynamic metaDescription;
dynamic metaTitle;
// dynamic metaKeywords;
// dynamic metaDescription;
// dynamic metaTitle;
bool allowCustomerReviews;
dynamic approvedRatingSum;
dynamic notApprovedRatingSum;
dynamic approvedTotalReviews;
dynamic notApprovedTotalReviews;
int approvedRatingSum;
int notApprovedRatingSum;
int approvedTotalReviews;
int notApprovedTotalReviews;
String sku;
bool isRx;
bool prescriptionRequired;
dynamic rxMessage;
dynamic rxMessagen;
dynamic manufacturerPartNumber;
dynamic gtin;
// dynamic rxMessage;
// dynamic rxMessagen;
// dynamic manufacturerPartNumber;
// dynamic gtin;
bool isGiftCard;
bool requireOtherProducts;
bool automaticallyAddRequiredProducts;
bool isDownload;
bool unlimitedDownloads;
dynamic maxNumberOfDownloads;
dynamic downloadExpirationDays;
int maxNumberOfDownloads;
// dynamic downloadExpirationDays;
bool hasSampleDownload;
bool hasUserAgreement;
bool isRecurring;
dynamic recurringCycleLength;
dynamic recurringTotalCycles;
int recurringCycleLength;
int recurringTotalCycles;
bool isRental;
dynamic rentalPriceLength;
int rentalPriceLength;
bool isShipEnabled;
bool isFreeShipping;
bool shipSeparately;
dynamic additionalShippingCharge;
int additionalShippingCharge;
bool isTaxExempt;
bool isTelecommunicationsOrBroadcastingOrElectronicServices;
bool useMultipleWarehouses;
dynamic manageInventoryMethodId;
dynamic stockQuantity;
String stockAvailability;
String stockAvailabilityn;
int manageInventoryMethodId;
int stockQuantity;
dynamic stockAvailability;
dynamic stockAvailabilityn;
bool displayStockAvailability;
bool displayStockQuantity;
dynamic minStockQuantity;
dynamic notifyAdminForQuantityBelow;
int minStockQuantity;
int notifyAdminForQuantityBelow;
bool allowBackInStockSubscriptions;
dynamic orderMinimumQuantity;
dynamic orderMaximumQuantity;
dynamic allowedQuantities;
int orderMinimumQuantity;
int orderMaximumQuantity;
// Null allowedQuantities;
bool allowAddingOnlyExistingAttributeCombinations;
bool disableBuyButton;
bool disableWishlistButton;
bool availableForPreOrder;
dynamic preOrderAvailabilityStartDateTimeUtc;
// dynamic preOrderAvailabilityStartDateTimeUtc;
bool callForPrice;
dynamic price;
dynamic oldPrice;
dynamic productCost;
dynamic specialPrice;
dynamic specialPriceStartDateTimeUtc;
dynamic specialPriceEndDateTimeUtc;
double price;
int oldPrice;
double productCost;
// dynamic specialPrice;
// dynamic specialPriceStartDateTimeUtc;
// dynamic specialPriceEndDateTimeUtc;
bool customerEntersPrice;
dynamic minimumCustomerEnteredPrice;
dynamic maximumCustomerEnteredPrice;
int minimumCustomerEnteredPrice;
int maximumCustomerEnteredPrice;
bool basepriceEnabled;
dynamic basepriceAmount;
dynamic basepriceBaseAmount;
int basepriceAmount;
int basepriceBaseAmount;
bool hasTierPrices;
bool hasDiscountsApplied;
dynamic discountName;
dynamic discountNamen;
dynamic discountDescription;
dynamic discountDescriptionn;
dynamic discountPercentage;
String currency;
String currencyn;
// dynamic discountName;
// dynamic discountNamen;
// dynamic discountDescription;
// dynamic discountDescriptionn;
// dynamic discountPercentage;
dynamic currency;
dynamic currencyn;
double weight;
dynamic length;
dynamic width;
dynamic height;
dynamic availableStartDateTimeUtc;
dynamic availableEndDateTimeUtc;
dynamic displayOrder;
int length;
int width;
int height;
// dynamic availableStartDateTimeUtc;
// dynamic availableEndDateTimeUtc;
int displayOrder;
bool published;
bool deleted;
String createdOnUtc;
String updatedOnUtc;
String productType;
dynamic parentGroupedProductId;
dynamic vendorId;
String seName;
dynamic createdOnUtc;
dynamic updatedOnUtc;
dynamic productType;
int 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;
int vendorId;
dynamic seName;
bool isinwishlist;
Products({
this.id,
this.visibleIndividually,
this.name,
this.namen,
this.shortDescription,
this.shortDescriptionn,
this.fullDescription,
this.fullDescriptionn,
this.markasNew,
this.showOnHomePage,
this.metaKeywords,
this.metaDescription,
this.metaTitle,
this.allowCustomerReviews,
this.approvedRatingSum,
this.notApprovedRatingSum,
this.approvedTotalReviews,
this.notApprovedTotalReviews,
this.sku,
this.isRx,
this.prescriptionRequired,
this.rxMessage,
this.rxMessagen,
this.manufacturerPartNumber,
this.gtin,
this.isGiftCard,
this.requireOtherProducts,
this.automaticallyAddRequiredProducts,
this.isDownload,
this.unlimitedDownloads,
this.maxNumberOfDownloads,
this.downloadExpirationDays,
this.hasSampleDownload,
this.hasUserAgreement,
this.isRecurring,
this.recurringCycleLength,
this.recurringTotalCycles,
this.isRental,
this.rentalPriceLength,
this.isShipEnabled,
this.isFreeShipping,
this.shipSeparately,
this.additionalShippingCharge,
this.isTaxExempt,
this.isTelecommunicationsOrBroadcastingOrElectronicServices,
this.useMultipleWarehouses,
this.manageInventoryMethodId,
this.stockQuantity,
this.stockAvailability,
this.stockAvailabilityn,
this.displayStockAvailability,
this.displayStockQuantity,
this.minStockQuantity,
this.notifyAdminForQuantityBelow,
this.allowBackInStockSubscriptions,
this.orderMinimumQuantity,
this.orderMaximumQuantity,
this.allowedQuantities,
this.allowAddingOnlyExistingAttributeCombinations,
this.disableBuyButton,
this.disableWishlistButton,
this.availableForPreOrder,
this.preOrderAvailabilityStartDateTimeUtc,
this.callForPrice,
this.price,
this.oldPrice,
this.productCost,
this.specialPrice,
this.specialPriceStartDateTimeUtc,
this.specialPriceEndDateTimeUtc,
this.customerEntersPrice,
this.minimumCustomerEnteredPrice,
this.maximumCustomerEnteredPrice,
this.basepriceEnabled,
this.basepriceAmount,
this.basepriceBaseAmount,
this.hasTierPrices,
this.hasDiscountsApplied,
this.discountName,
this.discountNamen,
this.discountDescription,
this.discountDescriptionn,
this.discountPercentage,
this.currency,
this.currencyn,
this.weight,
this.length,
this.width,
this.height,
this.availableStartDateTimeUtc,
this.availableEndDateTimeUtc,
this.displayOrder,
this.published,
this.deleted,
this.createdOnUtc,
this.updatedOnUtc,
this.productType,
this.parentGroupedProductId,
this.vendorId,
this.seName,
this.images,
});
RecommendedProductModel(
{this.id,
this.visibleIndividually,
this.name,
this.namen,
this.localizedNames,
this.shortDescription,
this.shortDescriptionn,
this.fullDescription,
this.fullDescriptionn,
this.markasNew,
this.showOnHomePage,
// this.metaKeywords,
// this.metaDescription,
// this.metaTitle,
this.allowCustomerReviews,
this.approvedRatingSum,
this.notApprovedRatingSum,
this.approvedTotalReviews,
this.notApprovedTotalReviews,
this.sku,
this.isRx,
this.prescriptionRequired,
// this.rxMessage,
// this.rxMessagen,
// this.manufacturerPartNumber,
// this.gtin,
this.isGiftCard,
this.requireOtherProducts,
this.automaticallyAddRequiredProducts,
this.isDownload,
this.unlimitedDownloads,
this.maxNumberOfDownloads,
// this.downloadExpirationDays,
this.hasSampleDownload,
this.hasUserAgreement,
this.isRecurring,
this.recurringCycleLength,
this.recurringTotalCycles,
this.isRental,
this.rentalPriceLength,
this.isShipEnabled,
this.isFreeShipping,
this.shipSeparately,
this.additionalShippingCharge,
this.isTaxExempt,
this.isTelecommunicationsOrBroadcastingOrElectronicServices,
this.useMultipleWarehouses,
this.manageInventoryMethodId,
this.stockQuantity,
this.stockAvailability,
this.stockAvailabilityn,
this.displayStockAvailability,
this.displayStockQuantity,
this.minStockQuantity,
this.notifyAdminForQuantityBelow,
this.allowBackInStockSubscriptions,
this.orderMinimumQuantity,
this.orderMaximumQuantity,
// this.allowedQuantities,
this.allowAddingOnlyExistingAttributeCombinations,
this.disableBuyButton,
this.disableWishlistButton,
this.availableForPreOrder,
// this.preOrderAvailabilityStartDateTimeUtc,
this.callForPrice,
this.price,
this.oldPrice,
this.productCost,
// this.specialPrice,
// this.specialPriceStartDateTimeUtc,
// this.specialPriceEndDateTimeUtc,
this.customerEntersPrice,
this.minimumCustomerEnteredPrice,
this.maximumCustomerEnteredPrice,
this.basepriceEnabled,
this.basepriceAmount,
this.basepriceBaseAmount,
this.hasTierPrices,
this.hasDiscountsApplied,
// this.discountName,
// this.discountNamen,
// this.discountDescription,
// this.discountDescriptionn,
// this.discountPercentage,
this.currency,
this.currencyn,
this.weight,
this.length,
this.width,
this.height,
// this.availableStartDateTimeUtc,
// this.availableEndDateTimeUtc,
this.displayOrder,
this.published,
this.deleted,
this.createdOnUtc,
this.updatedOnUtc,
this.productType,
this.parentGroupedProductId,
// this.roleIds,
// this.discountIds,
// this.storeIds,
this.manufacturerIds,
// this.reviews,
this.images,
// this.attributes,
this.specifications,
// this.associatedProductIds,
// this.tags,
this.vendorId,
this.seName,
this.isinwishlist});
Products.fromJson(Map<String, dynamic> json) {
RecommendedProductModel.fromJson(Map<String, dynamic> json) {
id = json['id'];
visibleIndividually = json['visible_individually'];
name = json['name'];
namen = json['namen'];
if (json['localized_names'] != null) {
localizedNames = new List<LocalizedNames>();
json['localized_names'].forEach((v) {
localizedNames.add(new LocalizedNames.fromJson(v));
});
}
shortDescription = json['short_description'];
shortDescriptionn = json['short_descriptionn'];
fullDescription = json['full_description'];
fullDescriptionn = json['full_descriptionn'];
markasNew = json['markas_new'];
showOnHomePage = json['show_on_home_page'];
metaKeywords = json['meta_keywords'];
metaDescription = json['meta_description'];
metaTitle = json['meta_title'];
// metaKeywords = json['meta_keywords'];
// metaDescription = json['meta_description'];
// metaTitle = json['meta_title'];
allowCustomerReviews = json['allow_customer_reviews'];
approvedRatingSum = json['approved_rating_sum'];
notApprovedRatingSum = json['not_approved_rating_sum'];
@ -250,18 +254,18 @@ class Products {
sku = json['sku'];
isRx = json['is_rx'];
prescriptionRequired = json['prescription_required'];
rxMessage = json['rx_message'];
rxMessagen = json['rx_messagen'];
manufacturerPartNumber = json['manufacturer_part_number'];
gtin = json['gtin'];
// rxMessage = json['rx_message'];
// rxMessagen = json['rx_messagen'];
// manufacturerPartNumber = json['manufacturer_part_number'];
// gtin = json['gtin'];
isGiftCard = json['is_gift_card'];
requireOtherProducts = json['require_other_products'];
automaticallyAddRequiredProducts =
json['automatically_add_required_products'];
json['automatically_add_required_products'];
isDownload = json['is_download'];
unlimitedDownloads = json['unlimited_downloads'];
maxNumberOfDownloads = json['max_number_of_downloads'];
downloadExpirationDays = json['download_expiration_days'];
// downloadExpirationDays = json['download_expiration_days'];
hasSampleDownload = json['has_sample_download'];
hasUserAgreement = json['has_user_agreement'];
isRecurring = json['is_recurring'];
@ -275,7 +279,7 @@ class Products {
additionalShippingCharge = json['additional_shipping_charge'];
isTaxExempt = json['is_tax_exempt'];
isTelecommunicationsOrBroadcastingOrElectronicServices =
json['is_telecommunications_or_broadcasting_or_electronic_services'];
json['is_telecommunications_or_broadcasting_or_electronic_services'];
useMultipleWarehouses = json['use_multiple_warehouses'];
manageInventoryMethodId = json['manage_inventory_method_id'];
stockQuantity = json['stock_quantity'];
@ -288,21 +292,21 @@ class Products {
allowBackInStockSubscriptions = json['allow_back_in_stock_subscriptions'];
orderMinimumQuantity = json['order_minimum_quantity'];
orderMaximumQuantity = json['order_maximum_quantity'];
allowedQuantities = json['allowed_quantities'];
// allowedQuantities = json['allowed_quantities'];
allowAddingOnlyExistingAttributeCombinations =
json['allow_adding_only_existing_attribute_combinations'];
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'];
productCost = json['product_cost'];
specialPrice = json['special_price'];
specialPriceStartDateTimeUtc = json['special_price_start_date_time_utc'];
specialPriceEndDateTimeUtc = json['special_price_end_date_time_utc'];
// specialPrice = json['special_price'];
// specialPriceStartDateTimeUtc = json['special_price_start_date_time_utc'];
// specialPriceEndDateTimeUtc = json['special_price_end_date_time_utc'];
customerEntersPrice = json['customer_enters_price'];
minimumCustomerEnteredPrice = json['minimum_customer_entered_price'];
maximumCustomerEnteredPrice = json['maximum_customer_entered_price'];
@ -311,19 +315,19 @@ class Products {
basepriceBaseAmount = json['baseprice_base_amount'];
hasTierPrices = json['has_tier_prices'];
hasDiscountsApplied = json['has_discounts_applied'];
discountName = json['discount_name'];
discountNamen = json['discount_namen'];
discountDescription = json['discount_description'];
discountDescriptionn = json['discount_Descriptionn'];
discountPercentage = json['discount_percentage'];
// discountName = json['discount_name'];
// discountNamen = json['discount_namen'];
// discountDescription = json['discount_description'];
// discountDescriptionn = json['discount_Descriptionn'];
// discountPercentage = json['discount_percentage'];
currency = json['currency'];
currencyn = json['currencyn'];
weight = json['weight'];
length = json['length'];
width = json['width'];
height = json['height'];
availableStartDateTimeUtc = json['available_start_date_time_utc'];
availableEndDateTimeUtc = json['available_end_date_time_utc'];
// availableStartDateTimeUtc = json['available_start_date_time_utc'];
// availableEndDateTimeUtc = json['available_end_date_time_utc'];
displayOrder = json['display_order'];
published = json['published'];
deleted = json['deleted'];
@ -331,14 +335,64 @@ class Products {
updatedOnUtc = json['updated_on_utc'];
productType = json['product_type'];
parentGroupedProductId = json['parent_grouped_product_id'];
vendorId = json['vendor_id'];
seName = json['se_name'];
// if (json['role_ids'] != null) {
// roleIds = new List<Null>();
// json['role_ids'].forEach((v) {
// roleIds.add(new Null.fromJson(v));
// });
// }
// if (json['discount_ids'] != null) {
// discountIds = new List<Null>();
// json['discount_ids'].forEach((v) {
// discountIds.add(new Null.fromJson(v));
// });
// }
// if (json['store_ids'] != null) {
// storeIds = new List<Null>();
// json['store_ids'].forEach((v) {
// storeIds.add(new Null.fromJson(v));
// });
// }
manufacturerIds = json['manufacturer_ids'].cast<int>();
// if (json['reviews'] != null) {
// reviews = new List<Null>();
// json['reviews'].forEach((v) {
// reviews.add(new Null.fromJson(v));
// });
// }
if (json['images'] != null) {
images = new List<Images>();
json['images'].forEach((v) {
images.add(new Images.fromJson(v));
});
}
// if (json['attributes'] != null) {
// attributes = new List<Null>();
// json['attributes'].forEach((v) {
// attributes.add(new Null.fromJson(v));
// });
// }
if (json['specifications'] != null) {
specifications = new List<Specifications>();
json['specifications'].forEach((v) {
specifications.add(new Specifications.fromJson(v));
});
}
// if (json['associated_product_ids'] != null) {
// associatedProductIds = new List<Null>();
// json['associated_product_ids'].forEach((v) {
// associatedProductIds.add(new Null.fromJson(v));
// });
// }
// if (json['tags'] != null) {
// tags = new List<Null>();
// json['tags'].forEach((v) {
// tags.add(new Null.fromJson(v));
// });
// }
vendorId = json['vendor_id'];
seName = json['se_name'];
isinwishlist = json['isinwishlist'];
}
Map<String, dynamic> toJson() {
@ -347,15 +401,19 @@ class Products {
data['visible_individually'] = this.visibleIndividually;
data['name'] = this.name;
data['namen'] = this.namen;
if (this.localizedNames != null) {
data['localized_names'] =
this.localizedNames.map((v) => v.toJson()).toList();
}
data['short_description'] = this.shortDescription;
data['short_descriptionn'] = this.shortDescriptionn;
data['full_description'] = this.fullDescription;
data['full_descriptionn'] = this.fullDescriptionn;
data['markas_new'] = this.markasNew;
data['show_on_home_page'] = this.showOnHomePage;
data['meta_keywords'] = this.metaKeywords;
data['meta_description'] = this.metaDescription;
data['meta_title'] = this.metaTitle;
// data['meta_keywords'] = this.metaKeywords;
// data['meta_description'] = this.metaDescription;
// data['meta_title'] = this.metaTitle;
data['allow_customer_reviews'] = this.allowCustomerReviews;
data['approved_rating_sum'] = this.approvedRatingSum;
data['not_approved_rating_sum'] = this.notApprovedRatingSum;
@ -364,10 +422,10 @@ class Products {
data['sku'] = this.sku;
data['is_rx'] = this.isRx;
data['prescription_required'] = this.prescriptionRequired;
data['rx_message'] = this.rxMessage;
data['rx_messagen'] = this.rxMessagen;
data['manufacturer_part_number'] = this.manufacturerPartNumber;
data['gtin'] = this.gtin;
// data['rx_message'] = this.rxMessage;
// data['rx_messagen'] = this.rxMessagen;
// data['manufacturer_part_number'] = this.manufacturerPartNumber;
// data['gtin'] = this.gtin;
data['is_gift_card'] = this.isGiftCard;
data['require_other_products'] = this.requireOtherProducts;
data['automatically_add_required_products'] =
@ -375,7 +433,7 @@ class Products {
data['is_download'] = this.isDownload;
data['unlimited_downloads'] = this.unlimitedDownloads;
data['max_number_of_downloads'] = this.maxNumberOfDownloads;
data['download_expiration_days'] = this.downloadExpirationDays;
// data['download_expiration_days'] = this.downloadExpirationDays;
data['has_sample_download'] = this.hasSampleDownload;
data['has_user_agreement'] = this.hasUserAgreement;
data['is_recurring'] = this.isRecurring;
@ -403,22 +461,22 @@ class Products {
this.allowBackInStockSubscriptions;
data['order_minimum_quantity'] = this.orderMinimumQuantity;
data['order_maximum_quantity'] = this.orderMaximumQuantity;
data['allowed_quantities'] = this.allowedQuantities;
// data['allowed_quantities'] = this.allowedQuantities;
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_end_date_time_utc'] = this.specialPriceEndDateTimeUtc;
// data['special_price'] = this.specialPrice;
// 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;
data['maximum_customer_entered_price'] = this.maximumCustomerEnteredPrice;
@ -427,19 +485,19 @@ class Products {
data['baseprice_base_amount'] = this.basepriceBaseAmount;
data['has_tier_prices'] = this.hasTierPrices;
data['has_discounts_applied'] = this.hasDiscountsApplied;
data['discount_name'] = this.discountName;
data['discount_namen'] = this.discountNamen;
data['discount_description'] = this.discountDescription;
data['discount_Descriptionn'] = this.discountDescriptionn;
data['discount_percentage'] = this.discountPercentage;
// data['discount_name'] = this.discountName;
// data['discount_namen'] = this.discountNamen;
// data['discount_description'] = this.discountDescription;
// data['discount_Descriptionn'] = this.discountDescriptionn;
// data['discount_percentage'] = this.discountPercentage;
data['currency'] = this.currency;
data['currencyn'] = this.currencyn;
data['weight'] = this.weight;
data['length'] = this.length;
data['width'] = this.width;
data['height'] = this.height;
data['available_start_date_time_utc'] = this.availableStartDateTimeUtc;
data['available_end_date_time_utc'] = this.availableEndDateTimeUtc;
// data['available_start_date_time_utc'] = this.availableStartDateTimeUtc;
// data['available_end_date_time_utc'] = this.availableEndDateTimeUtc;
data['display_order'] = this.displayOrder;
data['published'] = this.published;
data['deleted'] = this.deleted;
@ -447,12 +505,58 @@ class Products {
data['updated_on_utc'] = this.updatedOnUtc;
data['product_type'] = this.productType;
data['parent_grouped_product_id'] = this.parentGroupedProductId;
data['vendor_id'] = this.vendorId;
data['se_name'] = this.seName;
// if (this.roleIds != null) {
// data['role_ids'] = this.roleIds.map((v) => v.toJson()).toList();
// }
// if (this.discountIds != null) {
// 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['manufacturer_ids'] = this.manufacturerIds;
// if (this.reviews != null) {
// data['reviews'] = this.reviews.map((v) => v.toJson()).toList();
// }
if (this.images != null) {
data['images'] = this.images.map((v) => v.toJson()).toList();
}
// if (this.attributes != null) {
// data['attributes'] = this.attributes.map((v) => v.toJson()).toList();
// }
if (this.specifications != null) {
data['specifications'] =
this.specifications.map((v) => v.toJson()).toList();
}
// if (this.associatedProductIds != null) {
// data['associated_product_ids'] =
// this.associatedProductIds.map((v) => v.toJson()).toList();
// }
// if (this.tags != null) {
// data['tags'] = this.tags.map((v) => v.toJson()).toList();
// }
data['vendor_id'] = this.vendorId;
data['se_name'] = this.seName;
data['isinwishlist'] = this.isinwishlist;
return data;
}
}
class LocalizedNames {
int languageId;
String localizedName;
LocalizedNames({this.languageId, this.localizedName});
LocalizedNames.fromJson(Map<String, dynamic> json) {
languageId = json['language_id'];
localizedName = json['localized_name'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['language_id'] = this.languageId;
data['localized_name'] = this.localizedName;
return data;
}
}
@ -484,3 +588,40 @@ class Images {
return data;
}
}
class Specifications {
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.fromJson(Map<String, dynamic> json) {
id = json['id'];
displayOrder = json['display_order'];
defaultValue = json['default_value'];
defaultValuen = json['default_valuen'];
name = json['name'];
nameN = json['nameN'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['id'] = this.id;
data['display_order'] = this.displayOrder;
data['default_value'] = this.defaultValue;
data['default_valuen'] = this.defaultValuen;
data['name'] = this.name;
data['nameN'] = this.nameN;
return data;
}
}

@ -10,7 +10,6 @@ import 'package:diplomaticquarterapp/uitl/utils.dart';
class PharmacyModuleService extends BaseService {
final AppSharedPreferences sharedPref = AppSharedPreferences();
bool isFinished = true;
bool hasError = false;
String errorMsg = '';
String url = "";
@ -114,6 +113,7 @@ class PharmacyModuleService extends BaseService {
}
Future getTopManufacturerList() async {
hasError = false;
Map<String, String> queryParams = {'page': '1', 'limit': '8'};
try {
await baseAppClient.getPharmacy(GET_PHARMACY_TOP_MANUFACTURER,

@ -45,8 +45,6 @@ class PrescriptionService extends BaseService {
_prescriptionsList.add(Prescriptions.fromJson(prescriptions));
});
print(_prescriptionsList.length);
print("response is -------------"+response);
print(response);
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;

@ -34,7 +34,7 @@ class PharmacyModuleViewModel extends BaseViewModel {
_pharmacyService.lastVisitedProducts;
List<PharmacyProduct> get recommendedProductList =>
List<Map<String, dynamic>> get recommendedProductList =>
_recommendedProductService.recommendedList;
List<Prescriptions> get prescriptionsList =>
@ -74,6 +74,7 @@ class PharmacyModuleViewModel extends BaseViewModel {
setState(ViewState.Idle);
}
}
Future generatePharmacyToken() async {
setState(ViewState.Busy);
await _pharmacyService.generatePharmacyToken();
@ -137,7 +138,7 @@ class PharmacyModuleViewModel extends BaseViewModel {
}
}
/////////////RecommendedProducts
//////////////////////////////////////////RecommendedProducts
getRecommendedProducts(productId) async {
hasError = false;
setState(ViewState.Busy);

@ -0,0 +1,76 @@
class DentalProceduresModel {
List<ListIsPatientHasOnGoingEstimation> listIsPatientHasOnGoingEstimation;
DentalProceduresModel({this.listIsPatientHasOnGoingEstimation});
DentalProceduresModel.fromJson(Map<String, dynamic> json) {
if (json['List_IsPatientHasOnGoingEstimation'] != null) {
listIsPatientHasOnGoingEstimation =
new List<ListIsPatientHasOnGoingEstimation>();
json['List_IsPatientHasOnGoingEstimation'].forEach((v) {
listIsPatientHasOnGoingEstimation
.add(new ListIsPatientHasOnGoingEstimation.fromJson(v));
});
}
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
if (this.listIsPatientHasOnGoingEstimation != null) {
data['List_IsPatientHasOnGoingEstimation'] = this
.listIsPatientHasOnGoingEstimation
.map((v) => v.toJson())
.toList();
}
return data;
}
}
class ListIsPatientHasOnGoingEstimation {
dynamic setupID;
dynamic estimationNo;
int projectID;
String procedureId;
int patientID;
int sequenceNo;
int neededTime;
String procedureName;
dynamic procedureNameN;
ListIsPatientHasOnGoingEstimation(
{this.setupID,
this.estimationNo,
this.projectID,
this.procedureId,
this.patientID,
this.sequenceNo,
this.neededTime,
this.procedureName,
this.procedureNameN});
ListIsPatientHasOnGoingEstimation.fromJson(Map<String, dynamic> json) {
setupID = json['SetupID'];
estimationNo = json['EstimationNo'];
projectID = json['ProjectID'];
procedureId = json['ProcedureId'];
patientID = json['PatientID'];
sequenceNo = json['sequenceNo'];
neededTime = json['NeededTime'];
procedureName = json['ProcedureName'];
procedureNameN = json['ProcedureNameN'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['SetupID'] = this.setupID;
data['EstimationNo'] = this.estimationNo;
data['ProjectID'] = this.projectID;
data['ProcedureId'] = this.procedureId;
data['PatientID'] = this.patientID;
data['sequenceNo'] = this.sequenceNo;
data['NeededTime'] = this.neededTime;
data['ProcedureName'] = this.procedureName;
data['ProcedureNameN'] = this.procedureNameN;
return data;
}
}

@ -61,15 +61,15 @@ class Wishlist {
productAttributes: List<dynamic>.from(json["product_attributes"].map((x) => x)),
customerEnteredPrice: json["customer_entered_price"],
quantity: json["quantity"],
discountAmountInclTax: json["discount_amount_incl_tax"],
discountAmountInclTax: json["discount_amount_incl_tax"] != null ? json["discount_amount_incl_tax"] :0.0,
subtotal: json["subtotal"],
subtotalWithVat: json["subtotal_with_vat"],
subtotalVatAmount: json["subtotal_vat_amount"],
subtotalVatRate: json["subtotal_vat_rate"],
currency: json["currency"],
currencyn: json["currencyn"],
rentalStartDateUtc: json["rental_start_date_utc"],
rentalEndDateUtc: json["rental_end_date_utc"],
rentalStartDateUtc: json["rental_start_date_utc"] != null ? DateTime.parse(json["rental_start_date_utc"]) : DateTime.now(),
rentalEndDateUtc: json["rental_end_date_utc"] != null ? DateTime.parse(json["rental_end_date_utc"]) : DateTime.now(),
createdOnUtc: DateTime.parse(json["created_on_utc"]),
updatedOnUtc: DateTime.parse(json["updated_on_utc"]),
shoppingCartType: json["shopping_cart_type"],
@ -172,7 +172,7 @@ class Customer {
systemName: json["system_name"],
lastIpAddress: json["last_ip_address"],
createdOnUtc: DateTime.parse(json["created_on_utc"]),
lastLoginDateUtc: DateTime.parse(json["last_login_date_utc"]),
lastLoginDateUtc: json["last_login_date_utc"] != null ? DateTime.parse(json["last_login_date_utc"]) : DateTime.now(),
lastActivityDateUtc: DateTime.parse(json["last_activity_date_utc"]),
registeredInStoreId: json["registered_in_store_id"],
roleIds: List<dynamic>.from(json["role_ids"].map((x) => x)),
@ -335,9 +335,9 @@ class Product {
this.fullDescriptionn,
this.markasNew,
this.showOnHomePage,
this.metaKeywords,
this.metaDescription,
this.metaTitle,
// this.metaKeywords,
// this.metaDescription,
// this.metaTitle,
this.allowCustomerReviews,
this.approvedRatingSum,
this.notApprovedRatingSum,
@ -348,15 +348,15 @@ class Product {
this.prescriptionRequired,
this.rxMessage,
this.rxMessagen,
this.manufacturerPartNumber,
this.gtin,
// this.manufacturerPartNumber,
// this.gtin,
this.isGiftCard,
this.requireOtherProducts,
this.automaticallyAddRequiredProducts,
this.isDownload,
this.unlimitedDownloads,
this.maxNumberOfDownloads,
this.downloadExpirationDays,
// this.downloadExpirationDays,
this.hasSampleDownload,
this.hasUserAgreement,
this.isRecurring,
@ -382,7 +382,7 @@ class Product {
this.allowBackInStockSubscriptions,
this.orderMinimumQuantity,
this.orderMaximumQuantity,
this.allowedQuantities,
// this.allowedQuantities,
this.allowAddingOnlyExistingAttributeCombinations,
this.disableBuyButton,
this.disableWishlistButton,
@ -448,9 +448,9 @@ class Product {
String fullDescriptionn;
bool markasNew;
bool showOnHomePage;
dynamic metaKeywords;
dynamic metaDescription;
dynamic metaTitle;
// dynamic metaKeywords;
// dynamic metaDescription;
// dynamic metaTitle;
bool allowCustomerReviews;
dynamic approvedRatingSum;
dynamic notApprovedRatingSum;
@ -461,15 +461,15 @@ class Product {
bool prescriptionRequired;
dynamic rxMessage;
dynamic rxMessagen;
dynamic manufacturerPartNumber;
dynamic gtin;
// dynamic manufacturerPartNumber;
// dynamic gtin;
bool isGiftCard;
bool requireOtherProducts;
bool automaticallyAddRequiredProducts;
bool isDownload;
bool unlimitedDownloads;
dynamic maxNumberOfDownloads;
dynamic downloadExpirationDays;
// dynamic downloadExpirationDays;
bool hasSampleDownload;
bool hasUserAgreement;
bool isRecurring;
@ -495,7 +495,7 @@ class Product {
bool allowBackInStockSubscriptions;
dynamic orderMinimumQuantity;
dynamic orderMaximumQuantity;
dynamic allowedQuantities;
// dynamic allowedQuantities;
bool allowAddingOnlyExistingAttributeCombinations;
bool disableBuyButton;
bool disableWishlistButton;
@ -561,9 +561,9 @@ class Product {
fullDescriptionn: json["full_descriptionn"],
markasNew: json["markas_new"],
showOnHomePage: json["show_on_home_page"],
metaKeywords: json["meta_keywords"],
metaDescription: json["meta_description"],
metaTitle: json["meta_title"],
// metaKeywords: json["meta_keywords"],
// metaDescription: json["meta_description"],
// metaTitle: json["meta_title"],
allowCustomerReviews: json["allow_customer_reviews"],
approvedRatingSum: json["approved_rating_sum"],
notApprovedRatingSum: json["not_approved_rating_sum"],
@ -572,17 +572,17 @@ class Product {
sku: json["sku"],
isRx: json["is_rx"],
prescriptionRequired: json["prescription_required"],
rxMessage: json["rx_message"],
rxMessagen: json["rx_messagen"],
manufacturerPartNumber: json["manufacturer_part_number"],
gtin: json["gtin"],
rxMessage: json["rx_message"] != null ? json["rx_message"] : "" ,
rxMessagen: json["rx_messagen"] != null ? json["rx_messagen"] : "",
// manufacturerPartNumber: json["manufacturer_part_number"],
// gtin: json["gtin"],
isGiftCard: json["is_gift_card"],
requireOtherProducts: json["require_other_products"],
automaticallyAddRequiredProducts: json["automatically_add_required_products"],
isDownload: json["is_download"],
unlimitedDownloads: json["unlimited_downloads"],
maxNumberOfDownloads: json["max_number_of_downloads"],
downloadExpirationDays: json["download_expiration_days"],
// downloadExpirationDays: json["download_expiration_days"],
hasSampleDownload: json["has_sample_download"],
hasUserAgreement: json["has_user_agreement"],
isRecurring: json["is_recurring"],
@ -608,19 +608,19 @@ class Product {
allowBackInStockSubscriptions: json["allow_back_in_stock_subscriptions"],
orderMinimumQuantity: json["order_minimum_quantity"],
orderMaximumQuantity: json["order_maximum_quantity"],
allowedQuantities: json["allowed_quantities"],
// allowedQuantities: json["allowed_quantities"],
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"] != null ? DateTime.parse(json["pre_order_availability_start_date_time_utc"]) : DateTime.now(),
callForPrice: json["call_for_price"],
price: json["price"].toDouble(),
oldPrice: json["old_price"],
productCost: json["product_cost"].toDouble(),
specialPrice: json["special_price"],
specialPriceStartDateTimeUtc: json["special_price_start_date_time_utc"],
specialPriceEndDateTimeUtc: json["special_price_end_date_time_utc"],
specialPrice: json["special_price"] != null ? json["special_price"] : 0.0 ,
specialPriceStartDateTimeUtc: json["special_price_start_date_time_utc"] != null ? DateTime.parse(json["special_price_start_date_time_utc"]) : DateTime.now(),
specialPriceEndDateTimeUtc: json["special_price_end_date_time_utc"] != null ? DateTime.parse(json["special_price_end_date_time_utc"]) : DateTime.now(),
customerEntersPrice: json["customer_enters_price"],
minimumCustomerEnteredPrice: json["minimum_customer_entered_price"],
maximumCustomerEnteredPrice: json["maximum_customer_entered_price"],
@ -675,9 +675,9 @@ class Product {
"full_descriptionn": fullDescriptionn,
"markas_new": markasNew,
"show_on_home_page": showOnHomePage,
"meta_keywords": metaKeywords,
"meta_description": metaDescription,
"meta_title": metaTitle,
// "meta_keywords": metaKeywords,
// "meta_description": metaDescription,
// "meta_title": metaTitle,
"allow_customer_reviews": allowCustomerReviews,
"approved_rating_sum": approvedRatingSum,
"not_approved_rating_sum": notApprovedRatingSum,
@ -688,15 +688,15 @@ class Product {
"prescription_required": prescriptionRequired,
"rx_message": rxMessage,
"rx_messagen": rxMessagen,
"manufacturer_part_number": manufacturerPartNumber,
"gtin": gtin,
// "manufacturer_part_number": manufacturerPartNumber,
// "gtin": gtin,
"is_gift_card": isGiftCard,
"require_other_products": requireOtherProducts,
"automatically_add_required_products": automaticallyAddRequiredProducts,
"is_download": isDownload,
"unlimited_downloads": unlimitedDownloads,
"max_number_of_downloads": maxNumberOfDownloads,
"download_expiration_days": downloadExpirationDays,
// "download_expiration_days": downloadExpirationDays,
"has_sample_download": hasSampleDownload,
"has_user_agreement": hasUserAgreement,
"is_recurring": isRecurring,
@ -722,7 +722,7 @@ class Product {
"allow_back_in_stock_subscriptions": allowBackInStockSubscriptions,
"order_minimum_quantity": orderMinimumQuantity,
"order_maximum_quantity": orderMaximumQuantity,
"allowed_quantities": allowedQuantities,
// "allowed_quantities": allowedQuantities,
"allow_adding_only_existing_attribute_combinations": allowAddingOnlyExistingAttributeCombinations,
"disable_buy_button": disableBuyButton,
"disable_wishlist_button": disableWishlistButton,

@ -33,11 +33,15 @@ class CMCLocationPage extends StatefulWidget {
class _CMCLocationPageState extends State<CMCLocationPage> {
double latitude = 0;
double longitude = 0;
bool showCurrentLocation = false;
@override
void initState() {
latitude = widget.latitude;
longitude = widget.longitude;
if(latitude == 0.0 && longitude == 0.0) {
showCurrentLocation = true;
}
super.initState();
}
@ -149,7 +153,7 @@ class _CMCLocationPageState extends State<CMCLocationPage> {
);
},
initialPosition: LatLng(latitude, longitude),
useCurrentLocation: false,
useCurrentLocation: showCurrentLocation,
),
));
}

@ -40,7 +40,6 @@ class _NewCMCStepOnePageState extends State<NewCMCStepOnePage> {
return AppScaffold(
isShowAppBar: false,
isShowBottomNavBar: false,
baseViewModel: widget.model,
body: SingleChildScrollView(
physics: ScrollPhysics(),

@ -65,7 +65,6 @@ class _NewCMCStepThreePageState extends State<NewCMCStepThreePage> {
return AppScaffold(
isShowDecPage: false,
baseViewModel: widget.model,
isShowBottomNavBar: false,
body: SingleChildScrollView(
physics: BouncingScrollPhysics(),
child: Container(

@ -3,6 +3,7 @@ import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/Comprehens
import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/customer_addresses_service.dart';
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/cmc_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/uitl/location_util.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/select_location_dialog.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/location_page.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
@ -44,6 +45,7 @@ class _NewCMCStepTowPageState extends State<NewCMCStepTowPage> {
double latitude = 0;
double longitude = 0;
AddressInfo _selectedAddress;
bool showCurrentLocation = false;
@override
void initState() {
@ -56,14 +58,26 @@ class _NewCMCStepTowPageState extends State<NewCMCStepTowPage> {
super.initState();
}
setLatitudeAndLongitude({bool isSetState = false, String latLong}) {
if (latLong == null)
latLong = widget
.model.addressesList[widget.model.addressesList.length - 1].latLong;
List latLongArr = latLong.split(',');
setLatitudeAndLongitude({bool isSetState = false, String latLong}) async {
if (latLong == null){
if(widget.model.addressesList.isEmpty) {
latitude = double.parse(latLongArr[0]);
longitude = double.parse(latLongArr[1]);
setState(() {
showCurrentLocation = true;
});
} else {
latLong = widget
.model.addressesList[widget.model.addressesList.length - 1].latLong;
}
}
if(!showCurrentLocation) {
List latLongArr = latLong.split(',');
latitude = double.parse(latLongArr[0]);
longitude = double.parse(latLongArr[1]);
}
}
@override
@ -71,7 +85,6 @@ class _NewCMCStepTowPageState extends State<NewCMCStepTowPage> {
ProjectViewModel projectViewModel = Provider.of(context);
return AppScaffold(
isShowDecPage: false,
isShowBottomNavBar: false,
body: Stack(
children: [
PlacePicker(
@ -145,9 +158,11 @@ class _NewCMCStepTowPageState extends State<NewCMCStepTowPage> {
);
},
initialPosition: LatLng(latitude, longitude),
useCurrentLocation: false,
useCurrentLocation: showCurrentLocation,
),
Container(
if(widget.model.addressesList.isNotEmpty)
Container(
child: InkWell(
onTap: () =>
confirmSelectLocationDialog(widget.model.addressesList),

@ -51,7 +51,6 @@ class OrdersLogDetailsPage extends StatelessWidget {
return AppScaffold(
isShowAppBar: false,
baseViewModel: model,
isShowBottomNavBar: false,
body: SingleChildScrollView(
physics: ScrollPhysics(),
child: Container(

@ -93,7 +93,6 @@ class _NewEReferralStepOnePageState extends State<NewEReferralStepOnePage> {
onModelReady: (model) => model.getRelationTypes(),
builder: (_, model, widget) => AppScaffold(
isShowAppBar: false,
isShowBottomNavBar: false,
body: SingleChildScrollView(
physics: ScrollPhysics(),
child: Container(

@ -52,7 +52,6 @@ class _NewEReferralStepThreePageState extends State<NewEReferralStepThreePage> {
return BaseView<EReferralViewModel>(
builder: (_, model, widget) => AppScaffold(
isShowAppBar: false,
isShowBottomNavBar: false,
body: SingleChildScrollView(
physics: ScrollPhysics(),
child: Container(

@ -60,7 +60,6 @@ class _NewEReferralStepTowPageState extends State<NewEReferralStepTowPage> {
onModelReady: (model) => model.getAllCities(),
builder: (_, model, widget) => AppScaffold(
isShowAppBar: false,
isShowBottomNavBar: false,
body: SingleChildScrollView(
physics: ScrollPhysics(),
child: Container(

@ -38,7 +38,6 @@ class _EReferralPageState extends State<EReferralPage>
return BaseView<EReferralViewModel>(
builder: (_, model, widget) => AppScaffold(
isShowAppBar: true,
appBarTitle: TranslationBase.of(context).ereferral,
description: TranslationBase.of(context).eReferralInfo,
imagesInfo: [

@ -47,7 +47,6 @@ class _SearchForReferralsPageState extends State<SearchForReferralsPage> {
onModelReady: (model) => model.getAllCities(),
builder: (_, model, widget) => AppScaffold(
isShowAppBar: false,
isShowBottomNavBar: false,
body: SingleChildScrollView(
physics: ScrollPhysics(),
child: Container(

@ -33,12 +33,16 @@ class _LocationPageState
extends State<LocationPage> {
double latitude = 0;
double longitude = 0;
bool showCurrentLocation = false;
@override
void initState() {
latitude = widget.latitude;
longitude = widget.longitude;
if(latitude == 0.0 && longitude == 0.0) {
showCurrentLocation = true;
}
super.initState();
}
@ -141,7 +145,7 @@ class _LocationPageState
);
},
initialPosition: LatLng(latitude, longitude),
useCurrentLocation: false,
useCurrentLocation: showCurrentLocation,
),
));
}

@ -52,7 +52,6 @@ class _NewHomeHealthCareStepOnePageState
return AppScaffold(
isShowAppBar: false,
baseViewModel: widget.model,
isShowBottomNavBar: false,
body: SingleChildScrollView(
physics: ScrollPhysics(),
child: Container(

@ -71,7 +71,6 @@ class _NewHomeHealthCareStepThreePageState
return AppScaffold(
isShowDecPage: false,
baseViewModel: widget.model,
isShowBottomNavBar: false,
body: SingleChildScrollView(
physics: BouncingScrollPhysics(),
child: Container(

@ -46,6 +46,8 @@ class _NewHomeHealthCareStepTowPageState
double latitude = 0;
double longitude = 0;
AddressInfo _selectedAddress;
bool showCurrentLocation = false;
@override
void initState() {
@ -60,13 +62,25 @@ class _NewHomeHealthCareStepTowPageState
}
setLatitudeAndLongitude({bool isSetState = false, String latLong}) {
if (latLong == null)
latLong = widget.model.addressesList[widget.model.addressesList
.length - 1].latLong;
List latLongArr = latLong.split(',');
if (latLong == null){
if(widget.model.addressesList.isEmpty) {
setState(() {
showCurrentLocation = true;
});
} else {
latLong = widget.model.addressesList[widget.model.addressesList
.length - 1].latLong;
}
}
if(!showCurrentLocation) {
List latLongArr = latLong.split(',');
latitude = double.parse(latLongArr[0]);
longitude = double.parse(latLongArr[1]);
}
latitude = double.parse(latLongArr[0]);
longitude = double.parse(latLongArr[1]);
}
@override
@ -74,7 +88,6 @@ class _NewHomeHealthCareStepTowPageState
ProjectViewModel projectViewModel = Provider.of(context);
return AppScaffold(
isShowDecPage: false,
isShowBottomNavBar: false,
body: Stack(
children: [
PlacePicker(
@ -148,8 +161,9 @@ class _NewHomeHealthCareStepTowPageState
);
},
initialPosition: LatLng(latitude, longitude),
useCurrentLocation: false,
useCurrentLocation: showCurrentLocation,
),
if(widget.model.addressesList.isNotEmpty)
Container(
child: InkWell(
onTap: () =>

@ -0,0 +1,69 @@
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
import 'home_health_care_page.dart';
class HomeHealthCareIndexPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return AppScaffold(
isShowAppBar: true,
appBarTitle: TranslationBase.of(context).serviceInformation,
body: SingleChildScrollView(
padding: EdgeInsets.all(12),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Texts(
TranslationBase.of(context).homeHealthCare,
fontWeight: FontWeight.normal,
fontSize: 25,
color: Color(0xff60686b),
),
SizedBox(
height: 12,
),
Texts(
TranslationBase.of(context).homeHealthCareText,
fontWeight: FontWeight.normal,
fontSize: 17,
),
SizedBox(
height: 22,
),
Center(
child: Image.asset(
'assets/images/AlHabibMedicalService/Wifi-AR.png')),
SizedBox(
height: 77,
),
],
)),
bottomSheet: Container(
height: MediaQuery.of(context).size.height * 0.10,
width: double.infinity,
child: Column(
children: <Widget>[
Container(
width: MediaQuery.of(context).size.width * 0.9,
child: SecondaryButton(
onTap: () => Navigator.push(
context,
FadePage(
page: HomeHealthCarePage(),
),
),
label: TranslationBase.of(context).loginRegister,
textColor: Theme.of(context).backgroundColor),
),
],
),
));
}
}

@ -51,7 +51,6 @@ class OrdersLogDetailsPage extends StatelessWidget {
return AppScaffold(
isShowAppBar: false,
baseViewModel: model,
isShowBottomNavBar: false,
body: SingleChildScrollView(
physics: ScrollPhysics(),
child: Container(

@ -169,7 +169,7 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
Navigator.push(
context,
FadePage(
page: MedicalProfilePage(isFromAllServicePage: true),
page: MedicalProfilePage(),
),
);
},

@ -13,7 +13,6 @@ class H2OPageIndexPage extends StatelessWidget {
Widget build(BuildContext context) {
return AppScaffold(
isShowAppBar: true,
//isShowBottomNavBar: false,
appBarTitle: TranslationBase.of(context).serviceInformation,
body: SingleChildScrollView(
padding: EdgeInsets.all(12),

@ -48,7 +48,6 @@ class _H2OPageState extends State<H2OPage> with SingleTickerProviderStateMixin {
onModelReady: (model) => model.getUserDetail(),
builder: (_, model, widget) => AppScaffold(
isShowAppBar: true,
isShowBottomNavBar: false,
appBarTitle: TranslationBase.of(context).waterTracker,
showHomeAppBarIcon: false,
baseViewModel: model,

@ -19,8 +19,6 @@ class MonthPage extends StatelessWidget {
onModelReady: (model) => model.getUserProgressForMonthData(),
builder: (_, model, widget) => AppScaffold(
isShowAppBar: false,
isShowBottomNavBar: false,
appBarTitle: TranslationBase.of(context).h2o,
baseViewModel: model,
body: Padding(

@ -22,7 +22,6 @@ class TodayPage extends StatelessWidget {
onModelReady: (model) => model.getUserProgressForTodayData(),
builder: (_, model, widget) => AppScaffold(
isShowAppBar: false,
isShowBottomNavBar: false,
appBarTitle: TranslationBase.of(context).h2o,
baseViewModel: model,
body: SingleChildScrollView(

@ -19,7 +19,6 @@ class WeekPage extends StatelessWidget {
onModelReady: (model) => model.getUserProgressForWeekData(),
builder: (_, model, widget) => AppScaffold(
isShowAppBar: false,
isShowBottomNavBar: false,
appBarTitle: TranslationBase.of(context).h2o,
baseViewModel: model,
body: Padding(

@ -32,8 +32,6 @@ class _BookingOptionsState extends State<BookingOptions> {
return AppScaffold(
isShowAppBar: widget.isAppbar,
isShowDecPage: false,
isShowBottomNavBar: false,
appBarTitle: TranslationBase.of(context).bookAppo,
body: Container(
margin: EdgeInsets.fromLTRB(10.0, 20.0, 10.0, 10.0),

@ -1,11 +1,18 @@
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/models/Appointments/DentalChiefComplaintsModel.dart';
import 'package:diplomaticquarterapp/models/Appointments/DentalProceduresModel.dart';
import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart';
import 'package:diplomaticquarterapp/models/Appointments/SearchInfoModel.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/widgets/DentalComplaintCard.dart';
import 'package:diplomaticquarterapp/pages/livecare/widgets/clinic_card.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/widgets/DoctorView.dart';
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart';
import 'package:diplomaticquarterapp/widgets/others/app_expandable_notifier.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart';
@ -22,12 +29,18 @@ class _DentalComplaintsState extends State<DentalComplaints> {
List<ListDentalChiefComplain> complaintsList = [];
AppSharedPreferences sharedPref = AppSharedPreferences();
bool isDataLoaded = false;
bool hasDentalPlan = false;
var languageID;
int totalAppointmentTime = 0;
List<DoctorList> doctorsList = [];
DentalProceduresModel dentalProceduresModel;
List<PatientDoctorAppointmentList> patientDoctorAppointmentListHospital = List();
@override
void initState() {
WidgetsBinding.instance
.addPostFrameCallback((_) => getChiefComplaintsList());
WidgetsBinding.instance.addPostFrameCallback((_) => checkIfHasDentalPlan());
super.initState();
}
@ -38,37 +51,206 @@ class _DentalComplaintsState extends State<DentalComplaints> {
appBarTitle: "Symptoms",
body: Container(
margin: EdgeInsets.fromLTRB(10.0, 10.0, 10.0, 0.0),
child: ListView.builder(
itemCount: complaintsList.length,
itemBuilder: (BuildContext context, int index) {
return Container(
margin: EdgeInsets.only(bottom: 10.0),
child: DentalComplaintCard(
listDentalChiefComplain: complaintsList[index],
languageID: languageID,
child: !hasDentalPlan
? ListView.builder(
itemCount: complaintsList.length,
itemBuilder: (BuildContext context, int index) {
return Container(
margin: EdgeInsets.only(bottom: 10.0),
child: DentalComplaintCard(
listDentalChiefComplain: complaintsList[index],
languageID: languageID,
),
);
},
)
: Container(
child: SingleChildScrollView(
child: Column(
children: [
Container(
margin: EdgeInsets.only(top: 10.0),
child: Text(TranslationBase.of(context).dentalProcedureList, textAlign: TextAlign.center, style: TextStyle(fontSize: 18.0, fontWeight: FontWeight.bold, letterSpacing: 0.5)),
),
Container(
margin: EdgeInsets.only(top: 20.0),
child: Table(
children: getProceduresData(),
),
),
...List.generate(
patientDoctorAppointmentListHospital.length,
(index) => AppExpandableNotifier(
isExpand: true,
title: patientDoctorAppointmentListHospital[index].filterName + " - " + patientDoctorAppointmentListHospital[index].distanceInKMs + " " + TranslationBase.of(context).km,
bodyWidget: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: patientDoctorAppointmentListHospital[index].patientDoctorAppointmentList.map((doctor) {
return DoctorView(
doctor: doctor,
isLiveCareAppointment: false,
);
}).toList(),
)),
)
],
),
),
);
},
),
),
);
}
List<TableRow> getProceduresData() {
List<TableRow> tableRow = [];
tableRow.add(
TableRow(
children: [
Container(
child: Container(
child: Center(
child: Text(TranslationBase.of(context).procedureName, style: TextStyle(color: Colors.black, fontWeight: FontWeight.bold, fontSize: 14.0)),
),
),
),
Container(
child: Container(
margin: EdgeInsets.only(bottom: 10.0),
child: Center(
child: Text(TranslationBase.of(context).timeNeeded, style: TextStyle(color: Colors.black, fontWeight: FontWeight.bold, fontSize: 14.0)),
),
),
),
],
),
);
dentalProceduresModel.listIsPatientHasOnGoingEstimation.forEach((procedure) {
tableRow.add(TableRow(children: [
Container(
child: Container(
child: Center(
child: Text(procedure.procedureName, textAlign: TextAlign.center, style: TextStyle(color: Colors.black, fontSize: 14.0)),
),
),
),
Container(
child: Container(
child: Center(
child: Text(procedure.neededTime.toString() + " mins", textAlign: TextAlign.center, style: TextStyle(color: Colors.black, fontSize: 14.0)),
),
),
),
]));
});
tableRow.add(
TableRow(
children: [
Container(
child: Container(
child: Center(
child: Text(TranslationBase.of(context).totalTimeNeeded, textAlign: TextAlign.center, style: TextStyle(color: Colors.black, fontWeight: FontWeight.bold, fontSize: 14.0)),
),
),
),
Container(
child: Container(
margin: EdgeInsets.only(bottom: 10.0),
child: Center(
child: Text(totalAppointmentTime.toString() + " mins", textAlign: TextAlign.center, style: TextStyle(color: Colors.black, fontWeight: FontWeight.bold, fontSize: 14.0)),
),
),
),
],
),
);
return tableRow;
}
getLanguageID() async {
languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
}
checkIfHasDentalPlan() {
DoctorsListService service = new DoctorsListService();
GifLoaderDialogUtils.showMyDialog(context);
service.checkIfHasDentalPlan(widget.searchInfo.ProjectID, context).then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) {
if (res['List_IsPatientHasOnGoingEstimation'].length != 0) {
ConfirmDialog dialog = new ConfirmDialog(
context: context,
confirmMessage: TranslationBase.of(context).continuePlan,
okText: TranslationBase.of(context).yes,
cancelText: TranslationBase.of(context).no,
okFunction: () => {Navigator.of(context).pop(), continueDentalPlan()},
cancelFunction: () => {getChiefComplaintsList()});
dialog.showAlertDialog(context);
} else {
getChiefComplaintsList();
}
}
}).catchError((err) {
print(err);
});
}
continueDentalPlan() {
DoctorsListService service = new DoctorsListService();
GifLoaderDialogUtils.showMyDialog(context);
int appoTime = 0;
service.getDoctorsList(int.parse("17"), widget.searchInfo.ProjectID, false, context, isContinueDentalPlan: true).then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) {
print(res['List_IsPatientHasOnGoingEstimation']);
dentalProceduresModel = DentalProceduresModel.fromJson(res);
dentalProceduresModel.listIsPatientHasOnGoingEstimation.forEach((procedure) {
appoTime += procedure.neededTime;
});
setState(() {
hasDentalPlan = true;
totalAppointmentTime = appoTime;
});
if (res['DoctorList'].length != 0) {
doctorsList.clear();
res['DoctorList'].forEach((v) {
doctorsList.add(new DoctorList.fromJson(v));
});
doctorsList.forEach((element) {
List<PatientDoctorAppointmentList> doctorByHospital = patientDoctorAppointmentListHospital
.where(
(elementClinic) => elementClinic.filterName == element.projectName,
)
.toList();
if (doctorByHospital.length != 0) {
patientDoctorAppointmentListHospital[patientDoctorAppointmentListHospital.indexOf(doctorByHospital[0])].patientDoctorAppointmentList.add(element);
} else {
patientDoctorAppointmentListHospital
.add(PatientDoctorAppointmentList(filterName: element.projectName, distanceInKMs: element.projectDistanceInKiloMeters.toString(), patientDoctorAppointment: element));
}
});
} else {}
} else {
AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
}
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
print(err);
AppToast.showErrorToast(message: err);
});
}
getChiefComplaintsList() {
GifLoaderDialogUtils.showMyDialog(context);
getLanguageID();
ClinicListService service = new ClinicListService();
service
.getChiefComplaintsList(
widget.searchInfo.ClinicID, widget.searchInfo.ProjectID, context)
.then((res) {
service.getChiefComplaintsList(widget.searchInfo.ClinicID, widget.searchInfo.ProjectID, context).then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) {
print(res['List_DentalChiefComplain']);
setState(() {
res['List_DentalChiefComplain'].forEach((v) {
complaintsList.add(new ListDentalChiefComplain.fromJson(v));

@ -68,7 +68,6 @@ class _DoctorProfileState extends State<DoctorProfile>
return AppScaffold(
appBarTitle: TranslationBase.of(context).bookAppo,
isShowAppBar: true,
isShowBottomNavBar: false,
isShowDecPage: false,
bottomSheet: showFooterButton
? Container(

@ -1,67 +1,10 @@
import 'package:diplomaticquarterapp/models/Appointments/DoctorProfile.dart';
import 'package:diplomaticquarterapp/models/Appointments/doctor_pre_post_image.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
class DoctorPostPreImagesPage extends StatefulWidget{
final DoctorPrePostImages doctorPrePostImages;
const DoctorPostPreImagesPage({this.doctorPrePostImages});
@override
State<StatefulWidget> createState() => DoctorPostPreImagesPageState();
}
class DoctorPostPreImagesPageState extends State<DoctorPostPreImagesPage>{
@override
Widget build(BuildContext context) {
var images = widget.doctorPrePostImages;
return AppScaffold(
appBarTitle: TranslationBase.of(context).beforeAfterImages,
isShowAppBar: true,
isShowDecPage: false,
body: Padding(
padding: const EdgeInsets.symmetric(vertical: 20, horizontal: 10),
child: Row(
children: [
Expanded(
child: Column(
children: [
Text("Before Image", style: TextStyle(color: Colors.black, fontSize: 17, fontWeight: FontWeight.bold, letterSpacing: 1),),
Image.memory(images.getPreBytes(), errorBuilder: (ctx,err, trace){
return Container(
color: Colors.grey.withOpacity(0.25),
);
},)
],
)
),
Divider(color: Colors.grey.withOpacity(0.5)),
Expanded(
child: Column(
children: [
Text("After Image", style: TextStyle(color: Colors.black, fontSize: 17, fontWeight: FontWeight.bold, letterSpacing: 1),),
Image.memory(images.getPostBytes(),errorBuilder: (ctx,err, trace){
return Container(
color: Colors.grey.withOpacity(0.25),
);
},)
],
)
)
],
),
)
);
}
}
class DoctorPostPreImagesContent extends StatefulWidget{
class DoctorPostPreImagesContent extends StatefulWidget {
final DoctorPrePostImages doctorPrePostImages;
const DoctorPostPreImagesContent({this.doctorPrePostImages});
@ -70,14 +13,13 @@ class DoctorPostPreImagesContent extends StatefulWidget{
DoctorPostPreImagesContentState createState() => DoctorPostPreImagesContentState();
}
class DoctorPostPreImagesContentState extends State<DoctorPostPreImagesContent>{
class DoctorPostPreImagesContentState extends State<DoctorPostPreImagesContent> {
@override
Widget build(BuildContext context) {
var images = widget.doctorPrePostImages;
return Material(
color: Colors.transparent,
child: Center(
return Center(
child: Material(
color: Colors.transparent,
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
@ -85,31 +27,45 @@ class DoctorPostPreImagesContentState extends State<DoctorPostPreImagesContent>{
children: [
Expanded(
child: Column(
children: [
Text("Before", style: TextStyle(color: Colors.white, fontSize: 17, fontWeight: FontWeight.bold, letterSpacing: 1),),
SizedBox(height: 10,),
Image.memory(images.getPreBytes(), errorBuilder: (ctx,err, trace){
return Container(
color: Colors.grey.withOpacity(0.25),
);
},)
],
children: [
Text(
"Before",
style: TextStyle(color: Colors.white, fontSize: 17, fontWeight: FontWeight.bold, letterSpacing: 1),
),
SizedBox(
height: 10,
),
Image.memory(
images.getPreBytes(),
errorBuilder: (ctx, err, trace) {
return Container(
color: Colors.grey.withOpacity(0.25),
);
},
)
),
],
)),
Divider(color: Colors.grey.withOpacity(0.5)),
Expanded(
child: Column(
children: [
Text("After", style: TextStyle(color: Colors.white, fontSize: 17, fontWeight: FontWeight.bold, letterSpacing: 1),),
SizedBox(height: 10,),
Image.memory(images.getPostBytes(),errorBuilder: (ctx,err, trace){
return Container(
color: Colors.grey.withOpacity(0.25),
);
},)
],
children: [
Text(
"After",
style: TextStyle(color: Colors.white, fontSize: 17, fontWeight: FontWeight.bold, letterSpacing: 1),
),
SizedBox(
height: 10,
),
Image.memory(
images.getPostBytes(),
errorBuilder: (ctx, err, trace) {
return Container(
color: Colors.grey.withOpacity(0.25),
);
},
)
)
],
))
],
),
],
@ -117,5 +73,4 @@ class DoctorPostPreImagesContentState extends State<DoctorPostPreImagesContent>{
),
);
}
}
}

@ -41,7 +41,6 @@ class _LiveChatPageState extends State<LiveChatPage>
Widget build(BuildContext context) {
return AppScaffold(
isShowAppBar: true,
isShowBottomNavBar: false,
imagesInfo: imagesInfo,
title: TranslationBase.of(context).liveChat,
description: TranslationBase.of(context).infoChat,

@ -39,7 +39,6 @@ class _FindUsPageState extends State<FindUsPage>
builder: (_, model, w) => AppScaffold(
isShowAppBar: true,
isShowDecPage: false,
isShowBottomNavBar: false,
appBarTitle: 'Locations',
baseViewModel: model,
body: Scaffold(

@ -38,10 +38,7 @@ import 'package:provider/provider.dart';
class MyFamily extends StatefulWidget {
final bool isAppbarVisible;
final bool isFromAllServicePage;
MyFamily({this.isAppbarVisible = true, this.isFromAllServicePage = false});
MyFamily({this.isAppbarVisible = true});
@override
_MyFamily createState() => _MyFamily();
}
@ -95,8 +92,6 @@ class _MyFamily extends State<MyFamily> with TickerProviderStateMixin {
isShowAppBar: widget.isAppbarVisible,
imagesInfo: imagesInfo,
description: TranslationBase.of(context).familyInfo,
isShowBottomNavBar: widget.isFromAllServicePage,
body: Scaffold(
extendBodyBehindAppBar: true,
appBar: PreferredSize(

@ -51,7 +51,6 @@ class _AmbulanceReqState extends State<AmbulanceReq>
onModelReady: (model) => model.getAmRequestOrders(),
builder: (_, model, widget) => AppScaffold(
isShowAppBar: true,
isShowBottomNavBar: false,
appBarTitle: TranslationBase.of(context).transportationService,
description: TranslationBase.of(context).infoAmbulance,
imagesInfo: imagesInfo,

@ -65,7 +65,6 @@ class _AppointmentDetailsState extends State<AppointmentDetails>
return AppScaffold(
appBarTitle: widget.appo.doctorNameObj,
isShowAppBar: true,
isShowBottomNavBar: false,
bottomSheet: AppointmentDetails.showFooterButton
? Container(
width: MediaQuery.of(context).size.width,

@ -81,8 +81,6 @@ class _ToDoState extends State<ToDo> {
isShowAppBar: widget.isShowAppBar,
isShowDecPage: true,
description: TranslationBase.of(context).infoTodo,
isShowBottomNavBar: false,
body: SingleChildScrollView(
child: Column(
children: <Widget>[

@ -42,7 +42,6 @@ class _FeedbackHomePageState extends State<FeedbackHomePage>
isShowAppBar: true,
isBottomBar: false,
isShowDecPage: false,
isShowBottomNavBar: false,
appBarTitle: TranslationBase.of(context).feedbackTitle,
body: Scaffold(
extendBodyBehindAppBar: true,

@ -50,7 +50,6 @@ class _HomePageState extends State<HomePage> {
builder: (_, model, wi) => AppScaffold(
isShowDecPage: false,
isHelp: true,
isShowBottomNavBar: false,
body: Container(
width: double.infinity,
child: SingleChildScrollView(

@ -32,7 +32,6 @@ import 'package:diplomaticquarterapp/widgets/buttons/floatingActionButton.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart';
import 'package:diplomaticquarterapp/widgets/drawer/app_drawer_widget.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:firebase_analytics/observer.dart';
import 'package:firebase_messaging/firebase_messaging.dart';
import 'package:flutter/cupertino.dart';
@ -50,11 +49,8 @@ import 'package:diplomaticquarterapp/uitl/app_toast.dart';
class LandingPage extends StatefulWidget {
static LandingPage shared;
int currentTab = 0;
_LandingPageState state;
LandingPage({currentTabLocal}) {
currentTab = currentTabLocal ?? 0;
LandingPage() {
LandingPage.shared = this;
}
@ -73,6 +69,7 @@ class LandingPage extends StatefulWidget {
class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
var authProvider = new AuthProvider();
int currentTab = 0;
PageController pageController;
ProjectViewModel projectViewModel;
ToDoCountProviderModel model;
@ -105,7 +102,7 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
changeCurrentTab(int tab) {
setState(() {
if (widget.currentTab > 0 && tab == 2)
if (currentTab > 0 && tab == 2)
pageController.jumpToPage(0);
else if (tab != 0) {
if (tab == 4 && model.count == 0) {
@ -119,7 +116,7 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
pageController.jumpToPage(tab);
}
widget.currentTab = tab;
currentTab = tab;
});
}
@ -178,8 +175,7 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
AppGlobal.context = context;
_requestIOSPermissions();
pageController =
PageController(keepPage: true, initialPage: widget.currentTab);
pageController = PageController(keepPage: true);
_firebaseMessaging.setAutoInitEnabled(true);
locationUtils =
@ -488,84 +484,94 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
projectViewModel = Provider.of(context);
model = Provider.of<ToDoCountProviderModel>(context);
return AppScaffold(
isShowAppBar: true,
showHomeAppBarIcon: false,
appBarTitle: getText(widget.currentTab).toUpperCase(),
leading: Builder(
builder: (BuildContext context) {
return new Stack(
children: <Widget>[
widget.currentTab == 0
? IconButton(
icon: Icon(Icons.menu),
color: Theme.of(context).textTheme.headline1.color,
onPressed: () => Scaffold.of(context).openDrawer(),
)
: IconButton(
icon: Icon(Icons.arrow_back),
color: Theme.of(context).textTheme.headline1.color,
onPressed: () {
setState(() {
widget.currentTab = 0;
});
pageController.jumpToPage(0);
},
),
notificationCount != ''
? new Positioned(
right: projectViewModel.isArabic ? 35 : 0,
top: 5,
child: new Container(
padding: EdgeInsets.all(4),
decoration: new BoxDecoration(
color: Colors.red,
borderRadius: BorderRadius.circular(20),
),
constraints: BoxConstraints(
minWidth: 20,
minHeight: 20,
),
child: new Text(
notificationCount,
style: new TextStyle(
color: Colors.white,
fontSize: projectViewModel.isArabic ? 8 : 9,
return Scaffold(
appBar: AppBar(
elevation: 0,
textTheme: TextTheme(
headline6: TextStyle(
color: Theme.of(context).textTheme.headline1.color,
fontWeight: FontWeight.bold),
),
title: Text(
getText(currentTab).toUpperCase(),
style: TextStyle(
fontWeight: FontWeight.bold,
color: Theme.of(context).textTheme.headline1.color,
fontFamily: projectViewModel.isArabic ? 'Cairo' : 'WorkSans'),
// bold: true,
// color: Colors.white,
),
leading: Builder(
builder: (BuildContext context) {
return new Stack(
children: <Widget>[
currentTab == 0
? IconButton(
icon: Icon(Icons.menu),
color: Theme.of(context).textTheme.headline1.color,
onPressed: () => Scaffold.of(context).openDrawer(),
)
: IconButton(
icon: Icon(Icons.arrow_back),
color: Theme.of(context).textTheme.headline1.color,
onPressed: () {
setState(() {
currentTab = 0;
});
pageController.jumpToPage(0);
},
),
notificationCount != ''
? new Positioned(
right: projectViewModel.isArabic ? 35 : 0,
top: 5,
child: new Container(
padding: EdgeInsets.all(4),
decoration: new BoxDecoration(
color: Colors.red,
borderRadius: BorderRadius.circular(20),
),
constraints: BoxConstraints(
minWidth: 20,
minHeight: 20,
),
child: new Text(
notificationCount,
style: new TextStyle(
color: Colors.white,
fontSize: projectViewModel.isArabic ? 8 : 9,
),
textAlign: TextAlign.center,
),
textAlign: TextAlign.center,
),
),
)
: SizedBox()
],
);
},
)
: SizedBox()
],
);
},
),
actions: [
IconButton(
//iconSize: 70,
icon: Icon(
projectViewModel.isLogin ? Icons.settings : Icons.login,
color: Theme.of(context).textTheme.headline1.color,
),
onPressed: () {
if (projectViewModel.isLogin)
Navigator.of(context).pushNamed(
SETTINGS,
);
else
login();
}, //do something,
)
],
centerTitle: true,
),
isShowDrawer: true,
appBarIcons: [
IconButton(
//iconSize: 70,
icon: Icon(
projectViewModel.isLogin ? Icons.settings : Icons.login,
color: Theme.of(context).textTheme.headline1.color,
),
onPressed: () {
if (projectViewModel.isLogin)
Navigator.of(context).pushNamed(
SETTINGS,
);
else
login();
}, //do something,
)
],
// drawer: SafeArea(child: AppDrawer()),
// extendBody: true,
isShowDecPage: false,
changeTab: changeCurrentTab,
isFromLandingPage: true,
currentTab: widget.currentTab,
drawer: SafeArea(child: AppDrawer()),
extendBody: true,
body: PageView(
physics: NeverScrollableScrollPhysics(),
controller: pageController,
@ -581,9 +587,13 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
ToDo(isShowAppBar: false),
], // Please do not remove the BookingOptions from this array
),
bottomNavigationBar: BottomNavBar(
changeIndex: changeCurrentTab,
index: currentTab,
),
floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked,
floatingActionButton:
(projectViewModel.havePrivilege(34) && widget.currentTab == 0)
(projectViewModel.havePrivilege(34) && currentTab == 0)
? FloatingButton(
elevation: true,
onTap: () {

@ -110,6 +110,35 @@ class _LandingPagePharmacyState extends State<LandingPagePharmacy> {
centerTitle: true,
)
: null,
// : AppBar(
// backgroundColor: Color(0xff5AB145),
// elevation: 0,
// textTheme: TextTheme(
// headline6: TextStyle(
// color: Colors.white, fontWeight: FontWeight.bold),
// ),
// title: Text(getText(currentTab).toUpperCase()),
// leading: Builder(
// builder: (BuildContext context) {
// return IconButton(
// icon: Icon(Icons.arrow_back),
// color: Colors.white,
// onPressed: () => Scaffold.of(context).openDrawer(),
// );
// },
// ),
// actions: [
// // IconButton(
// // iconSize: 70,
// // icon: SvgPicture.asset('assets/images/svg/robort_svg.svg',
// // height: 100, width: 100, fit: BoxFit.cover),
// // onPressed: () {
// // triggerRobot();
// // } //do something,
// // )
// ],
// centerTitle: true,
// ),
extendBody: false,
body: PageView(
physics: NeverScrollableScrollPhysics(),

@ -51,7 +51,6 @@ class _LiveCareHomeState extends State<LiveCareHome>
return AppScaffold(
appBarTitle: "LiveCare",
isShowAppBar: true,
isShowBottomNavBar: false,
imagesInfo: imagesInfo,
description: TranslationBase.of(context).erConsultation,
body: Container(

@ -101,7 +101,6 @@ class _ConfirmLogin extends State<ConfirmLogin> {
appBarTitle: TranslationBase.of(context).confirm,
isShowAppBar: true,
isShowDecPage: false,
isShowBottomNavBar: false,
body: SingleChildScrollView(
child: Container(
padding: EdgeInsets.all(20),

@ -31,7 +31,6 @@ class _ForgotPassword extends State<ForgotPassword> {
appBarTitle: TranslationBase.of(context).forgotFileNoTitle,
isShowAppBar: true,
isShowDecPage: false,
isShowBottomNavBar: false,
body: SingleChildScrollView(
child: Container(
padding: EdgeInsets.only(top: 10, left: 20, right: 20),

@ -21,7 +21,6 @@ class LoginType extends StatelessWidget {
appBarTitle: TranslationBase.of(context).login,
isShowAppBar: true,
isShowDecPage: false,
isShowBottomNavBar: false,
body: SingleChildScrollView(
child: Container(
padding:

@ -66,8 +66,8 @@ class _Login extends State<Login> {
super.initState();
if(BASE_URL.contains("uat.")){
nationalIDorFile.text = "1231755";
mobileNumberController.text = mobileNo = "537503378";
nationalIDorFile.text = "2001273";
mobileNumberController.text = mobileNo = "0555416043";
}
}
@ -85,7 +85,6 @@ class _Login extends State<Login> {
appBarTitle: TranslationBase.of(context).login,
isShowAppBar: true,
isShowDecPage: false,
isShowBottomNavBar: false,
body: SingleChildScrollView(
child: Container(
padding: EdgeInsets.only(top: 10, left: 20, right: 20, bottom: 30),

@ -74,7 +74,6 @@ class _RegisterInfo extends State<RegisterInfo> {
appBarTitle: TranslationBase.of(context).register,
isShowAppBar: true,
isShowDecPage: false,
isShowBottomNavBar: false,
body: SingleChildScrollView(
padding: EdgeInsets.all(20),
child: Column(children: <Widget>[

@ -49,7 +49,6 @@ class _Register extends State<Register> {
appBarTitle: TranslationBase.of(context).register,
isShowAppBar: true,
isShowDecPage: false,
isShowBottomNavBar: false,
body: SingleChildScrollView(
child: Container(
padding: EdgeInsets.only(top: 10, left: 20, right: 20, bottom: 30),

@ -30,7 +30,6 @@ class _WelcomeLogin extends State<WelcomeLogin> {
appBarTitle: TranslationBase.of(context).welcome,
isShowDecPage: false,
isShowAppBar: true,
isShowBottomNavBar: false,
body: Padding(
padding: EdgeInsets.all(20),
child: Column(

@ -39,7 +39,6 @@ class _AskDoctorHomPageState extends State<AskDoctorHomPage>
Widget build(BuildContext context) {
return AppScaffold(
isShowAppBar: true,
isShowBottomNavBar: false,
appBarTitle: TranslationBase.of(context).askDoctor,
body: Scaffold(
extendBodyBehindAppBar: true,

@ -44,7 +44,6 @@ class _EyeHomePageState extends State<EyeHomePage>
return AppScaffold(
isShowAppBar: true,
isShowDecPage: false,
isShowBottomNavBar: false,
appBarTitle: TranslationBase.of(context).measurements,
body: Scaffold(
extendBodyBehindAppBar: true,

@ -13,10 +13,6 @@ import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
class MedicalProfilePage extends StatefulWidget {
final bool isFromAllServicePage;
const MedicalProfilePage({ this.isFromAllServicePage = false}) ;
@override
_MedicalProfilePageState createState() => _MedicalProfilePageState();
}
@ -29,7 +25,6 @@ class _MedicalProfilePageState extends State<MedicalProfilePage> {
@override
Widget build(BuildContext context) {
projectViewModel = Provider.of(context);
var appoCountProvider = Provider.of<ToDoCountProviderModel>(context);
List<Widget> myMedicalList = Utils.myMedicalList(
projectViewModel: projectViewModel,
@ -38,12 +33,10 @@ class _MedicalProfilePageState extends State<MedicalProfilePage> {
isLogin: projectViewModel.isLogin);
return BaseView<MedicalViewModel>(
onModelReady: (model) => model.getAppointmentHistory(),
builder: (_, model, x) => AppScaffold(
builder: (_, model, widget) => AppScaffold(
isShowDecPage: false,
baseViewModel: model,
isHelp: true,
isShowBottomNavBar: widget.isFromAllServicePage,
body: Container(
child: SingleChildScrollView(
child: Column(

@ -42,7 +42,6 @@ class _WeightHomePageState extends State<WeightHomePage> with SingleTickerProvid
builder: (_, model, w) => AppScaffold(
isShowAppBar: true,
isShowDecPage: false,
isShowBottomNavBar: false,
appBarTitle: TranslationBase.of(context).weight,
appBarIcons: [
IconButton(
@ -101,29 +100,26 @@ class _WeightHomePageState extends State<WeightHomePage> with SingleTickerProvid
)
],
),
floatingActionButton: Container(
margin: EdgeInsets.only(bottom: 70),
child: InkWell(
onTap: () {
Navigator.push(
context,
FadePage(
page: AddWeightPage(
model: model,
)));
},
child: Container(
width: 55,
height: 55,
decoration: BoxDecoration(
shape: BoxShape.circle,
color: Theme.of(context).primaryColor,
),
child: Center(
child: Icon(
Icons.add,
color: Colors.white,
),
floatingActionButton: InkWell(
onTap: () {
Navigator.push(
context,
FadePage(
page: AddWeightPage(
model: model,
)));
},
child: Container(
width: 55,
height: 55,
decoration: BoxDecoration(
shape: BoxShape.circle,
color: Theme.of(context).primaryColor,
),
child: Center(
child: Icon(
Icons.add,
color: Colors.white,
),
),
),

@ -42,7 +42,6 @@ class _BloodPressureHomePageState extends State<BloodPressureHomePage>
onModelReady: (model) => model.getBloodPressure(),
builder: (_, model, w) => AppScaffold(
isShowAppBar: true,
isShowBottomNavBar: false,
appBarTitle: TranslationBase.of(context).bloodPressure,
baseViewModel: model,
appBarIcons: [IconButton(
@ -95,22 +94,19 @@ class _BloodPressureHomePageState extends State<BloodPressureHomePage>
)
],
),
floatingActionButton: Container(
margin: EdgeInsets.only(bottom: 70),
child: InkWell(
onTap: () {
Navigator.push(context, FadePage(page: AddBloodPressurePage(model: model,)));
},
child: Container(
width: 55,
height: 55,
decoration: BoxDecoration(
shape: BoxShape.circle, color: Theme.of(context).primaryColor),
child: Center(
child: Icon(
Icons.add,
color: Colors.white,
),
floatingActionButton: InkWell(
onTap: () {
Navigator.push(context, FadePage(page: AddBloodPressurePage(model: model,)));
},
child: Container(
width: 55,
height: 55,
decoration: BoxDecoration(
shape: BoxShape.circle, color: Theme.of(context).primaryColor),
child: Center(
child: Icon(
Icons.add,
color: Colors.white,
),
),
),

@ -47,7 +47,6 @@ class _BloodSugarHomePageState extends State<BloodSugarHomePage>
return BaseView<BloodSugarViewMode>(
onModelReady: (model) => model.getBloodSugar(),
builder: (_, model, w) => AppScaffold(
isShowBottomNavBar: false,
appBarIcons: [IconButton(
icon: Icon(Icons.email),
color: Colors.white,
@ -106,22 +105,19 @@ class _BloodSugarHomePageState extends State<BloodSugarHomePage>
)
],
),
floatingActionButton: Container(
margin: EdgeInsets.only(bottom: 70),
child: InkWell(
onTap: () {
Navigator.push(context, FadePage(page: AddBloodSugarPage(bloodSugarViewMode: model,)));
},
child: Container(
width: 55,
height: 55,
decoration: BoxDecoration(
shape: BoxShape.circle, color:Theme.of(context).primaryColor),
child: Center(
child: Icon(
Icons.add,
color: Colors.white,
),
floatingActionButton: InkWell(
onTap: () {
Navigator.push(context, FadePage(page: AddBloodSugarPage(bloodSugarViewMode: model,)));
},
child: Container(
width: 55,
height: 55,
decoration: BoxDecoration(
shape: BoxShape.circle, color:Theme.of(context).primaryColor),
child: Center(
child: Icon(
Icons.add,
color: Colors.white,
),
),
),

@ -47,7 +47,6 @@ class _HomePrescriptionsPageState extends State<HomePrescriptionsPage>
description: TranslationBase.of(context).infoPrescriptions,
infoList: TranslationBase.of(context).infoPrescriptionsPoints,
imagesInfo: imagesInfo,
isShowBottomNavBar: false,
body: Scaffold(
extendBodyBehindAppBar: true,
appBar: PreferredSize(

@ -59,7 +59,6 @@ class _HomeReportPageState extends State<HomeReportPage>
onModelReady: (model) => model.getReports(), //model.getPrescriptions(),
builder: (_, model, widget) => AppScaffold(
isShowAppBar: true,
isShowBottomNavBar: false,
appBarTitle: TranslationBase.of(context).newMedReport,
title: TranslationBase.of(context).medReport,
description: TranslationBase.of(context).infoMonthReport,

@ -44,7 +44,6 @@ class _StepsTrackerState extends State<StepsTracker>
isShowAppBar: true,
appBarTitle: "Steps",
isShowDecPage: false,
isShowBottomNavBar: false,
body: Container(
child: Column(
mainAxisSize: MainAxisSize.min,

@ -15,7 +15,7 @@ import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'package:provider/provider.dart';
import 'package:rating_bar/rating_bar.dart';
import 'package:diplomaticquarterapp/core/model/pharmacies/recommendedProduct_model.dart';
import 'screens/cart-order-page.dart';
int price = 0;
@ -28,12 +28,15 @@ String itemID;
var customerId;
CompareList compareItems = new CompareList();
PharmacyProduct specificationData;
//Products recommendedData;
class ProductDetailPage extends StatefulWidget {
final PharmacyProduct product;
// final Products recommendedProducts;
ProductDetailPage(this.product, );
ProductDetailPage(this.product);
@override
__ProductDetailPageState createState() => __ProductDetailPageState();
@ -73,6 +76,7 @@ class __ProductDetailPageState extends State<ProductDetailPage> {
price = 1;
specificationData = widget.product;
userInfo();
// recommendedData= widget.recommendedProducts;
super.initState();
}
@ -631,10 +635,11 @@ class __ProductDetailPageState extends State<ProductDetailPage> {
),
SingleChildScrollView(
child: Container(
width: 410,
color: Colors.white,
child: Column(
// crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
// mainAxisAlignment: MainAxisAlignment.start,
// mainAxisSize: MainAxisSize.min,
children: [
Container(
@ -645,7 +650,7 @@ class __ProductDetailPageState extends State<ProductDetailPage> {
// margin: EdgeInsets.symmetric(horizontal: 6, vertical: 4),
child: BaseView<PharmacyModuleViewModel>(
onModelReady: (model) => model.getRecommendedProducts(widget.product.id.toString()),
onModelReady: (model) => model.getRecommendedProducts(widget.product.id),
builder: (_, model, wi) => Container(
child:
// Text(model.recommendedProductList[0].id),
@ -664,7 +669,7 @@ class __ProductDetailPageState extends State<ProductDetailPage> {
Navigator.push(
context,
FadePage(
page: ProductDetailPage(model.recommendedProductList[index]),
page: ProductDetailPage(widget.product.id),
));
},
child: Card(
@ -694,26 +699,40 @@ class __ProductDetailPageState extends State<ProductDetailPage> {
child: Align(
alignment: Alignment.topRight,
child: IconButton(
icon: Icon(!isInWishlit ? Icons.favorite_border : Icons.favorite),
color: !isInWishlit ? Colors.grey : Colors.red,
icon: Icon(model.recommendedProductList[index]['isinwishlist'] != true ? Icons.favorite_border : Icons.favorite),
color: model.recommendedProductList[index]['isinwishlist'] != true ? Colors.grey : Colors.red,
onPressed: () async {
if (customerId != null) {
if (!isInWishlit) {
await addToWishlistFunction(model.recommendedProductList[index].id);
if (customerId != null ) {
if (!isInWishlit && model.recommendedProductList[index]['isinwishlist'] != true) {
GifLoaderDialogUtils.showMyDialog(context);
await addToWishlistFunction(model.recommendedProductList[index]['id']);
// checkWishlist();
GifLoaderDialogUtils.hideDialog(context);
setState((){
model.recommendedProductList[index]['isinwishlist'] = true;
});
} else {
await deleteFromWishlistFunction(model.recommendedProductList[index].id);
GifLoaderDialogUtils.showMyDialog(context);
await deleteFromWishlistFunction(model.recommendedProductList[index]['id']);
GifLoaderDialogUtils.hideDialog(context);
setState((){
model.recommendedProductList[index]['isinwishlist'] = false;
});
}
} else {
return;
return ;
}
setState(() {});
setState(() {
// checkWishlist();
});
},
)),
// child: Align(
// alignment: Alignment.topRight,
// child:itemID.contains(model.recommendedProductList[index].id)
// child:itemID.contains(model.recommendedProductList[index]['id'])
// // !isInWishlist
// ? IconButton(
// icon: Icon(Icons.favorite_border),
@ -751,10 +770,10 @@ class __ProductDetailPageState extends State<ProductDetailPage> {
alignment:
Alignment.center,
// padding: EdgeInsets.only(left: 25, bottom: 20),
child: (model.recommendedProductList[index].images != null &&
model.recommendedProductList[index].images.length > 0)
child: (model.recommendedProductList[index]['images'] != null &&
model.recommendedProductList[index]['images'].length > 0)
? Image.network(
model.recommendedProductList[index].images[0].src.toString(),
model.recommendedProductList[index]['images'][0]['src'].toString(),
// item.images[0].src,
fit: BoxFit.cover,
height: 60,
@ -766,7 +785,7 @@ class __ProductDetailPageState extends State<ProductDetailPage> {
),
),
Container(
width: model.recommendedProductList[index].rxMessage !=
width: model.recommendedProductList[index]['rx_message'] !=
null
? MediaQuery.of(context).size.width /
5
@ -782,8 +801,8 @@ class __ProductDetailPageState extends State<ProductDetailPage> {
),
child:
Texts(
model.recommendedProductList[index].rxMessage != null
? model.recommendedProductList[index].rxMessage
model.recommendedProductList[index]['rx_message'] != null
? model.recommendedProductList[index]['rx_message']
: "",
color:
Colors.white,
@ -811,8 +830,8 @@ class __ProductDetailPageState extends State<ProductDetailPage> {
Text(
languageID ==
"ar"
? model.recommendedProductList[index].namen
: model.recommendedProductList[index].name,
? model.recommendedProductList[index]['namen']
: model.recommendedProductList[index]['name'],
style:
TextStyle(
color:
@ -831,7 +850,7 @@ class __ProductDetailPageState extends State<ProductDetailPage> {
5),
child:
Texts(
"SAR ${model.recommendedProductList[index].price}",
"SAR ${model.recommendedProductList[index]['price']}",
bold:
true,
fontSize:
@ -858,7 +877,7 @@ class __ProductDetailPageState extends State<ProductDetailPage> {
child:
RatingBar.readOnly(
initialRating:
model.recommendedProductList[index].approvedRatingSum.toDouble(),
model.recommendedProductList[index]['approved_rating_sum'].toDouble(),
// initialRating: productRate,
size:
13.0,
@ -878,7 +897,7 @@ class __ProductDetailPageState extends State<ProductDetailPage> {
),
),
Texts(
"(${model.recommendedProductList[index].approvedTotalReviews.toString()})",
"(${model.recommendedProductList[index]['approved_total_reviews'].toString()})",
// bold: true,
fontSize:
12,
@ -892,7 +911,7 @@ class __ProductDetailPageState extends State<ProductDetailPage> {
}),
)
: Container(
// child: Text("NO DATA"),
child: Text("There is no product"),
),
)),
),
@ -2092,6 +2111,7 @@ addToWishlistFunction(itemID) async {
ProductDetailViewModel x = new ProductDetailViewModel();
isInWishlit = true;
await x.addToWishlistData(itemID);
}
deleteFromWishlistFunction(itemID) async {

@ -80,7 +80,6 @@ class _PharmacyPageState extends State<PharmacyPage> {
isShowAppBar: false,
isShowDecPage: false,
baseViewModel: model,
isPharmacy:true,
backgroundColor: Colors.white,
body: Container(
width: double.infinity,

File diff suppressed because it is too large Load Diff

@ -35,7 +35,6 @@ class _PharmacyCategorisePageState extends State<PharmacyCategorisePage> {
AppScaffold(
isShowDecPage: false,
baseViewModel: model,
isPharmacy:true,
body: Column(
children: [
Expanded(

@ -30,7 +30,7 @@ class DoctorsListService extends BaseService {
Future<Map> getDoctorsList(
int clinicID, int projectID, bool isNearest, BuildContext context,
{doctorId, doctorName}) async {
{doctorId, doctorName, isContinueDentalPlan = false}) async {
Map<String, dynamic> request;
if (await this.sharedPref.getObject(USER_PROFILE) != null) {
@ -61,20 +61,18 @@ class DoctorsListService extends BaseService {
"ClinicID": clinicID,
"ProjectID": projectID,
"DoctorName": doctorName, //!= null ? doctorId : 0,
"ContinueDentalPlan": false,
"IsSearchAppointmnetByClinicID": true,
"ContinueDentalPlan": isContinueDentalPlan,
"IsSearchAppointmnetByClinicID": isContinueDentalPlan ? false : true,
"PatientID": authUser.patientID != null ? authUser.patientID : 0,
"gender": authUser.gender != null ? authUser.gender : 0,
"age": authUser.age != null ? authUser.age : 0,
"IsGetNearAppointment": false,
// "Latitude": 0,
// "Longitude": 0,
// "License": true,
"SearchForVoiceCommand":
doctorId != null && doctorId.length > 0 ? true : false,
"DoctorIDsList": doctorId,
"Latitude": lat != null ? lat.toString() : 0,
"Longitude": long != null ? long.toString() : 0,
"isDentalAllowedBackend": isContinueDentalPlan,
"IsGetNearAppointment": isNearest,
if (isNearest)
"SelectedDate": DateUtil.convertDateToString(DateTime.now()),
@ -1483,7 +1481,6 @@ class DoctorsListService extends BaseService {
int projectId, BuildContext context) async {
Map<String, dynamic> request;
Request req = appGlobal.getPublicRequest();
request = {
"AppointmentNo": appointmentNo,
"NFC_Code": nfcCode,
@ -1498,4 +1495,21 @@ class DoctorsListService extends BaseService {
}, body: request);
return Future.value(localRes);
}
Future<Map> checkIfHasDentalPlan(int projectID, BuildContext context) async {
Map<String, dynamic> request;
request = {
"ProjectID": projectID,
};
dynamic localRes;
await baseAppClient.post(HAS_DENTAL_PLAN,
onSuccess: (response, statusCode) async {
localRes = response;
}, onFailure: (String error, int statusCode) {
throw error;
}, body: request);
return Future.value(localRes);
}
}

@ -16,24 +16,25 @@ class RecommendedProductService extends BaseService{
AuthenticatedUser authUser = new AuthenticatedUser();
AuthProvider authProvider = new AuthProvider();
List<PharmacyProduct> _recommendedProductList = List();
List<PharmacyProduct> get recommendedList => _recommendedProductList;
String url ="";
List<Map<String, dynamic>> _recommendedProductList = List();
List<Map<String, Object>> get recommendedList => _recommendedProductList;
Future getRecommendedProducts(productId) async {
var customerId = await sharedPref.getString(PHARMACY_CUSTOMER_ID);
hasError = false;
url =GET_RECOMMENDED_PRODUCT+productId;
await baseAppClient.getPharmacy(url,
await baseAppClient.getPharmacy(GET_RECOMMENDED_PRODUCT+"$productId/$customerId",
onSuccess: (dynamic response, int statusCode) {
_recommendedProductList.clear();
response['products'].forEach((item) {
_recommendedProductList.add(PharmacyProduct.fromJson(item));
print("----------------------------------");
print("Test data");
print(_recommendedProductList[0]);
print(item['name']);
print(response);
_recommendedProductList.add(item);
});
print("---------------------Recommended Product List------------------------");
print(_recommendedProductList.length);
//print(item['name']);
print(response);
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;

@ -1736,6 +1736,13 @@ class TranslationBase {
String get aboutApp => localizedValues["about-app"][locale.languageCode];
String get aboutPointsLength =>
localizedValues["about-points"]['length'][locale.languageCode];
String get continuePlan =>
localizedValues["continue-plan"][locale.languageCode];
String get dentalProcedureList =>
localizedValues["dental-procedure-list"][locale.languageCode];
String get timeNeeded => localizedValues["time-needed"][locale.languageCode];
String get totalTimeNeeded =>
localizedValues["total-time-needed"][locale.languageCode];
}
class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> {

@ -12,9 +12,7 @@ import 'package:diplomaticquarterapp/pages/pharmacies/screens/cart-order-page.da
import 'package:diplomaticquarterapp/routes.dart';
import 'package:diplomaticquarterapp/services/robo_search/event_provider.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/bottom_navigation/bottom_nav_bar.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/drawer/app_drawer_widget.dart';
import 'package:diplomaticquarterapp/widgets/others/bottom_bar.dart';
import 'package:diplomaticquarterapp/widgets/progress_indicator/app_loader_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
@ -46,7 +44,6 @@ class AppScaffold extends StatelessWidget {
final BaseViewModel baseViewModel;
final bool isBottomBar;
final Widget floatingActionButton;
final FloatingActionButtonLocation floatingActionButtonLocation;
final bool isPharmacy;
final bool isOfferPackages;
final bool showPharmacyCart;
@ -61,19 +58,10 @@ class AppScaffold extends StatelessWidget {
final List<Widget> appBarIcons;
final List<ImagesInfo> imagesInfo;
final bool isHelp;
final int currentTab;
final bool isShowBottomNavBar;
final bool isFromLandingPage;
final bool isShowDrawer;
final Function(int tab) changeTab;
final Widget leading;
AuthenticatedUserObject authenticatedUserObject =
locator<AuthenticatedUserObject>();
AppBarWidget appBar;
AppScaffold(
{@required this.body,
this.appBarTitle = '',
@ -97,14 +85,7 @@ class AppScaffold extends StatelessWidget {
this.infoList,
this.isHelp = false,
this.showHomeAppBarIcon = true,
this.imagesInfo,
this.currentTab,
this.isShowBottomNavBar = true,
this.isFromLandingPage = false,
this.changeTab,
this.floatingActionButtonLocation,
this.leading,
this.isShowDrawer = false});
this.imagesInfo});
AppScaffold setOnAppBarCartClick(VoidCallback onClick) {
_onCartClick = onClick;
@ -117,7 +98,6 @@ class AppScaffold extends StatelessWidget {
return Scaffold(
backgroundColor:
backgroundColor ?? Theme.of(context).scaffoldBackgroundColor,
drawer: isShowDrawer ? SafeArea(child: AppDrawer()) : null,
appBar: isShowAppBar
? appBar = AppBarWidget(
appBarTitle: appBarTitle,
@ -128,21 +108,15 @@ class AppScaffold extends StatelessWidget {
isOfferPackages: isOfferPackages,
showOfferPackagesCart: showOfferPackagesCart,
isShowDecPage: isShowDecPage,
leading: leading,
)
: null,
bottomSheet: bottomSheet,
bottomNavigationBar: isShowBottomNavBar && !getIsShowDecPageValue(context) && !isPharmacy
? BottomNavBar(
changeIndex: changeCurrentTab,
index: currentTab,
)
: null,
body: SafeArea(
top: true,
bottom: true,
child:
getIsShowDecPageValue(context)
(!Provider.of<ProjectViewModel>(context, listen: false).isLogin &&
isShowDecPage)
? NotAutPage(
title: title ?? appBarTitle,
description: description,
@ -157,15 +131,9 @@ class AppScaffold extends StatelessWidget {
: buildBodyWidget(context),
),
floatingActionButton: floatingActionButton,
floatingActionButtonLocation: floatingActionButtonLocation,
);
}
getIsShowDecPageValue(context){
return (!Provider.of<ProjectViewModel>(context, listen: false).isLogin &&
isShowDecPage);
}
buildAppLoaderWidget(bool isLoading) {
return isLoading ? AppLoaderWidget() : Container();
}
@ -174,18 +142,6 @@ class AppScaffold extends StatelessWidget {
return Stack(
children: <Widget>[body, isHelp == true ? RobotIcon() : Container()]);
}
void changeCurrentTab(int value) {
if (isFromLandingPage) {
changeTab(value);
} else {
Navigator.pushAndRemoveUntil(
AppGlobal.context,
MaterialPageRoute(
builder: (context) => LandingPage(currentTabLocal: value)),
(Route<dynamic> r) => false);
}
}
}
class AppBarWidget extends StatefulWidget with PreferredSizeWidget {
@ -203,8 +159,6 @@ class AppBarWidget extends StatefulWidget with PreferredSizeWidget {
Function(String) badgeUpdater;
final Widget leading;
AppBarWidget(
{this.appBarTitle,
this.showHomeAppBarIcon,
@ -213,8 +167,7 @@ class AppBarWidget extends StatefulWidget with PreferredSizeWidget {
this.showPharmacyCart = true,
this.isOfferPackages = false,
this.showOfferPackagesCart = false,
this.isShowDecPage = true,
this.leading});
this.isShowDecPage = true});
@override
State<StatefulWidget> createState() => AppBarWidgetState();
@ -225,7 +178,6 @@ class AppBarWidget extends StatefulWidget with PreferredSizeWidget {
class AppBarWidgetState extends State<AppBarWidget> {
String badgeText = "0";
@override
Widget build(BuildContext context) {
widget.badgeUpdater = badgeUpdateBlock;
@ -258,12 +210,11 @@ class AppBarWidgetState extends State<AppBarWidget> {
fontWeight: FontWeight.bold,
color: Theme.of(context).textTheme.headline1.color,
fontFamily: projectViewModel.isArabic ? 'Cairo' : 'WorkSans')),
leading: widget.leading ??
Builder(
builder: (BuildContext context) {
return ArrowBack();
},
),
leading: Builder(
builder: (BuildContext context) {
return ArrowBack();
},
),
centerTitle: true,
actions: <Widget>[
(widget.isPharmacy && widget.showPharmacyCart)
@ -405,7 +356,6 @@ class _RobotIcon extends State<RobotIcon> {
)))
: Container(),
FloatingSearchButton()
],
)
],
@ -414,10 +364,10 @@ class _RobotIcon extends State<RobotIcon> {
bottom: -15);
}
// setAnimation() async {
// /// await sharedPref.getBool(IS_ROBOT_VISIBLE) ||
// // var animation =
// // IS_TEXT_COMPLETED == ? true : false;
// setAnimation() async {
// /// await sharedPref.getBool(IS_ROBOT_VISIBLE) ||
// // var animation =
// // IS_TEXT_COMPLETED == ? true : false;
// }
// }
}

Loading…
Cancel
Save