Merge branch 'development' of https://gitlab.com/Cloud_Solution/diplomatic-quarter into pharmacy-bugs
commit
b39e88d9c8
@ -0,0 +1,4 @@
|
||||
-keep class tvi.webrtc.** { *; }
|
||||
-keep class com.twilio.video.** { *; }
|
||||
-keep class com.twilio.common.** { *; }
|
||||
-keepattributes InnerClasses
|
@ -0,0 +1,6 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="14.769" viewBox="0 0 16 14.769">
|
||||
<g id="Group_1463" data-name="Group 1463" transform="translate(-236)">
|
||||
<path id="Icon_ionic-md-heart-empty" data-name="Icon ionic-md-heart-empty" d="M14.975,4.5a4.732,4.732,0,0,0-3.6,1.688A4.732,4.732,0,0,0,7.775,4.5a4.35,4.35,0,0,0-4.4,4.427c0,3.058,2.719,5.512,6.838,9.3l1.162,1.046,1.162-1.046c4.119-3.785,6.838-6.238,6.838-9.3A4.35,4.35,0,0,0,14.975,4.5ZM11.867,17.165l-.162.15-.331.3-.331-.3-.162-.15a48.887,48.887,0,0,1-4.719-4.692A5.643,5.643,0,0,1,4.61,8.927a3.2,3.2,0,0,1,.912-2.281,3.13,3.13,0,0,1,2.254-.915,3.527,3.527,0,0,1,2.658,1.25L11.375,8.1l.942-1.119a3.514,3.514,0,0,1,2.658-1.25,3.145,3.145,0,0,1,2.258.915,3.206,3.206,0,0,1,.912,2.281,5.673,5.673,0,0,1-1.554,3.546A48.986,48.986,0,0,1,11.867,17.165Z" transform="translate(232.625 -4.5)" fill="#ed1c2b"/>
|
||||
<path id="Path_1790" data-name="Path 1790" d="M251.438,12.227,249.66,10.76l-3.555.651a15.239,15.239,0,0,0-1.295,2.378c.072.2,1.295,4.436,1.295,4.436l4.258,4.295,1.609,1.241L253.7,22.52l3.551-3.5,1.979-3.813-.72-3.488-1.741-.962-3.069.651-1.883,1.342Z" transform="translate(-8 -10)" fill="#ed1c2b" stroke="#ed1c2b" stroke-width="1"/>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 1.2 KiB |
@ -0,0 +1,3 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="14.769" viewBox="0 0 16 14.769">
|
||||
<path id="Icon_ionic-md-heart-empty" data-name="Icon ionic-md-heart-empty" d="M14.975,4.5a4.732,4.732,0,0,0-3.6,1.688A4.732,4.732,0,0,0,7.775,4.5a4.35,4.35,0,0,0-4.4,4.427c0,3.058,2.719,5.512,6.838,9.3l1.162,1.046,1.162-1.046c4.119-3.785,6.838-6.238,6.838-9.3A4.35,4.35,0,0,0,14.975,4.5ZM11.867,17.165l-.162.15-.331.3-.331-.3-.162-.15a48.887,48.887,0,0,1-4.719-4.692A5.643,5.643,0,0,1,4.61,8.927a3.2,3.2,0,0,1,.912-2.281,3.13,3.13,0,0,1,2.254-.915,3.527,3.527,0,0,1,2.658,1.25L11.375,8.1l.942-1.119a3.514,3.514,0,0,1,2.658-1.25,3.145,3.145,0,0,1,2.258.915,3.206,3.206,0,0,1,.912,2.281,5.673,5.673,0,0,1-1.554,3.546A48.986,48.986,0,0,1,11.867,17.165Z" transform="translate(-3.375 -4.5)" fill="#b5b5b5"/>
|
||||
</svg>
|
After Width: | Height: | Size: 804 B |
Binary file not shown.
After Width: | Height: | Size: 212 B |
@ -0,0 +1,486 @@
|
||||
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;
|
||||
bool visibleIndividually;
|
||||
String name;
|
||||
String namen;
|
||||
String shortDescription;
|
||||
String shortDescriptionn;
|
||||
String fullDescription;
|
||||
String fullDescriptionn;
|
||||
bool markasNew;
|
||||
bool showOnHomePage;
|
||||
dynamic metaKeywords;
|
||||
dynamic metaDescription;
|
||||
dynamic metaTitle;
|
||||
bool allowCustomerReviews;
|
||||
dynamic approvedRatingSum;
|
||||
dynamic notApprovedRatingSum;
|
||||
dynamic approvedTotalReviews;
|
||||
dynamic notApprovedTotalReviews;
|
||||
String sku;
|
||||
bool isRx;
|
||||
bool prescriptionRequired;
|
||||
dynamic rxMessage;
|
||||
dynamic rxMessagen;
|
||||
dynamic manufacturerPartNumber;
|
||||
dynamic gtin;
|
||||
bool isGiftCard;
|
||||
bool requireOtherProducts;
|
||||
bool automaticallyAddRequiredProducts;
|
||||
bool isDownload;
|
||||
bool unlimitedDownloads;
|
||||
dynamic maxNumberOfDownloads;
|
||||
dynamic downloadExpirationDays;
|
||||
bool hasSampleDownload;
|
||||
bool hasUserAgreement;
|
||||
bool isRecurring;
|
||||
dynamic recurringCycleLength;
|
||||
dynamic recurringTotalCycles;
|
||||
bool isRental;
|
||||
dynamic rentalPriceLength;
|
||||
bool isShipEnabled;
|
||||
bool isFreeShipping;
|
||||
bool shipSeparately;
|
||||
dynamic additionalShippingCharge;
|
||||
bool isTaxExempt;
|
||||
bool isTelecommunicationsOrBroadcastingOrElectronicServices;
|
||||
bool useMultipleWarehouses;
|
||||
dynamic manageInventoryMethodId;
|
||||
dynamic stockQuantity;
|
||||
String stockAvailability;
|
||||
String stockAvailabilityn;
|
||||
bool displayStockAvailability;
|
||||
bool displayStockQuantity;
|
||||
dynamic minStockQuantity;
|
||||
dynamic notifyAdminForQuantityBelow;
|
||||
bool allowBackInStockSubscriptions;
|
||||
dynamic orderMinimumQuantity;
|
||||
dynamic orderMaximumQuantity;
|
||||
dynamic allowedQuantities;
|
||||
bool allowAddingOnlyExistingAttributeCombinations;
|
||||
bool disableBuyButton;
|
||||
bool disableWishlistButton;
|
||||
bool availableForPreOrder;
|
||||
dynamic preOrderAvailabilityStartDateTimeUtc;
|
||||
bool callForPrice;
|
||||
dynamic price;
|
||||
dynamic oldPrice;
|
||||
dynamic productCost;
|
||||
dynamic specialPrice;
|
||||
dynamic specialPriceStartDateTimeUtc;
|
||||
dynamic specialPriceEndDateTimeUtc;
|
||||
bool customerEntersPrice;
|
||||
dynamic minimumCustomerEnteredPrice;
|
||||
dynamic maximumCustomerEnteredPrice;
|
||||
bool basepriceEnabled;
|
||||
dynamic basepriceAmount;
|
||||
dynamic basepriceBaseAmount;
|
||||
bool hasTierPrices;
|
||||
bool hasDiscountsApplied;
|
||||
dynamic discountName;
|
||||
dynamic discountNamen;
|
||||
dynamic discountDescription;
|
||||
dynamic discountDescriptionn;
|
||||
dynamic discountPercentage;
|
||||
String currency;
|
||||
String currencyn;
|
||||
double weight;
|
||||
dynamic length;
|
||||
dynamic width;
|
||||
dynamic height;
|
||||
dynamic availableStartDateTimeUtc;
|
||||
dynamic availableEndDateTimeUtc;
|
||||
dynamic displayOrder;
|
||||
bool published;
|
||||
bool deleted;
|
||||
String createdOnUtc;
|
||||
String updatedOnUtc;
|
||||
String productType;
|
||||
dynamic parentGroupedProductId;
|
||||
dynamic vendorId;
|
||||
String seName;
|
||||
List<Images> images;
|
||||
|
||||
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,
|
||||
});
|
||||
|
||||
Products.fromJson(Map<String, dynamic> json) {
|
||||
id = json['id'];
|
||||
visibleIndividually = json['visible_individually'];
|
||||
name = json['name'];
|
||||
namen = json['namen'];
|
||||
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'];
|
||||
allowCustomerReviews = json['allow_customer_reviews'];
|
||||
approvedRatingSum = json['approved_rating_sum'];
|
||||
notApprovedRatingSum = json['not_approved_rating_sum'];
|
||||
approvedTotalReviews = json['approved_total_reviews'];
|
||||
notApprovedTotalReviews = json['not_approved_total_reviews'];
|
||||
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'];
|
||||
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'];
|
||||
hasSampleDownload = json['has_sample_download'];
|
||||
hasUserAgreement = json['has_user_agreement'];
|
||||
isRecurring = json['is_recurring'];
|
||||
recurringCycleLength = json['recurring_cycle_length'];
|
||||
recurringTotalCycles = json['recurring_total_cycles'];
|
||||
isRental = json['is_rental'];
|
||||
rentalPriceLength = json['rental_price_length'];
|
||||
isShipEnabled = json['is_ship_enabled'];
|
||||
isFreeShipping = json['is_free_shipping'];
|
||||
shipSeparately = json['ship_separately'];
|
||||
additionalShippingCharge = json['additional_shipping_charge'];
|
||||
isTaxExempt = json['is_tax_exempt'];
|
||||
isTelecommunicationsOrBroadcastingOrElectronicServices =
|
||||
json['is_telecommunications_or_broadcasting_or_electronic_services'];
|
||||
useMultipleWarehouses = json['use_multiple_warehouses'];
|
||||
manageInventoryMethodId = json['manage_inventory_method_id'];
|
||||
stockQuantity = json['stock_quantity'];
|
||||
stockAvailability = json['stock_availability'];
|
||||
stockAvailabilityn = json['stock_availabilityn'];
|
||||
displayStockAvailability = json['display_stock_availability'];
|
||||
displayStockQuantity = json['display_stock_quantity'];
|
||||
minStockQuantity = json['min_stock_quantity'];
|
||||
notifyAdminForQuantityBelow = json['notify_admin_for_quantity_below'];
|
||||
allowBackInStockSubscriptions = json['allow_back_in_stock_subscriptions'];
|
||||
orderMinimumQuantity = json['order_minimum_quantity'];
|
||||
orderMaximumQuantity = json['order_maximum_quantity'];
|
||||
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'];
|
||||
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'];
|
||||
customerEntersPrice = json['customer_enters_price'];
|
||||
minimumCustomerEnteredPrice = json['minimum_customer_entered_price'];
|
||||
maximumCustomerEnteredPrice = json['maximum_customer_entered_price'];
|
||||
basepriceEnabled = json['baseprice_enabled'];
|
||||
basepriceAmount = json['baseprice_amount'];
|
||||
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'];
|
||||
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'];
|
||||
displayOrder = json['display_order'];
|
||||
published = json['published'];
|
||||
deleted = json['deleted'];
|
||||
createdOnUtc = json['created_on_utc'];
|
||||
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['images'] != null) {
|
||||
images = new List<Images>();
|
||||
json['images'].forEach((v) {
|
||||
images.add(new Images.fromJson(v));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['id'] = this.id;
|
||||
data['visible_individually'] = this.visibleIndividually;
|
||||
data['name'] = this.name;
|
||||
data['namen'] = this.namen;
|
||||
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['allow_customer_reviews'] = this.allowCustomerReviews;
|
||||
data['approved_rating_sum'] = this.approvedRatingSum;
|
||||
data['not_approved_rating_sum'] = this.notApprovedRatingSum;
|
||||
data['approved_total_reviews'] = this.approvedTotalReviews;
|
||||
data['not_approved_total_reviews'] = this.notApprovedTotalReviews;
|
||||
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['is_gift_card'] = this.isGiftCard;
|
||||
data['require_other_products'] = this.requireOtherProducts;
|
||||
data['automatically_add_required_products'] =
|
||||
this.automaticallyAddRequiredProducts;
|
||||
data['is_download'] = this.isDownload;
|
||||
data['unlimited_downloads'] = this.unlimitedDownloads;
|
||||
data['max_number_of_downloads'] = this.maxNumberOfDownloads;
|
||||
data['download_expiration_days'] = this.downloadExpirationDays;
|
||||
data['has_sample_download'] = this.hasSampleDownload;
|
||||
data['has_user_agreement'] = this.hasUserAgreement;
|
||||
data['is_recurring'] = this.isRecurring;
|
||||
data['recurring_cycle_length'] = this.recurringCycleLength;
|
||||
data['recurring_total_cycles'] = this.recurringTotalCycles;
|
||||
data['is_rental'] = this.isRental;
|
||||
data['rental_price_length'] = this.rentalPriceLength;
|
||||
data['is_ship_enabled'] = this.isShipEnabled;
|
||||
data['is_free_shipping'] = this.isFreeShipping;
|
||||
data['ship_separately'] = this.shipSeparately;
|
||||
data['additional_shipping_charge'] = this.additionalShippingCharge;
|
||||
data['is_tax_exempt'] = this.isTaxExempt;
|
||||
data['is_telecommunications_or_broadcasting_or_electronic_services'] =
|
||||
this.isTelecommunicationsOrBroadcastingOrElectronicServices;
|
||||
data['use_multiple_warehouses'] = this.useMultipleWarehouses;
|
||||
data['manage_inventory_method_id'] = this.manageInventoryMethodId;
|
||||
data['stock_quantity'] = this.stockQuantity;
|
||||
data['stock_availability'] = this.stockAvailability;
|
||||
data['stock_availabilityn'] = this.stockAvailabilityn;
|
||||
data['display_stock_availability'] = this.displayStockAvailability;
|
||||
data['display_stock_quantity'] = this.displayStockQuantity;
|
||||
data['min_stock_quantity'] = this.minStockQuantity;
|
||||
data['notify_admin_for_quantity_below'] = this.notifyAdminForQuantityBelow;
|
||||
data['allow_back_in_stock_subscriptions'] =
|
||||
this.allowBackInStockSubscriptions;
|
||||
data['order_minimum_quantity'] = this.orderMinimumQuantity;
|
||||
data['order_maximum_quantity'] = this.orderMaximumQuantity;
|
||||
data['allowed_quantities'] = this.allowedQuantities;
|
||||
data['allow_adding_only_existing_attribute_combinations'] =
|
||||
this.allowAddingOnlyExistingAttributeCombinations;
|
||||
data['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['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['customer_enters_price'] = this.customerEntersPrice;
|
||||
data['minimum_customer_entered_price'] = this.minimumCustomerEnteredPrice;
|
||||
data['maximum_customer_entered_price'] = this.maximumCustomerEnteredPrice;
|
||||
data['baseprice_enabled'] = this.basepriceEnabled;
|
||||
data['baseprice_amount'] = this.basepriceAmount;
|
||||
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['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['display_order'] = this.displayOrder;
|
||||
data['published'] = this.published;
|
||||
data['deleted'] = this.deleted;
|
||||
data['created_on_utc'] = this.createdOnUtc;
|
||||
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.images != null) {
|
||||
data['images'] = this.images.map((v) => v.toJson()).toList();
|
||||
}
|
||||
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class Images {
|
||||
int id;
|
||||
int position;
|
||||
String src;
|
||||
String thumb;
|
||||
String attachment;
|
||||
|
||||
Images({this.id, this.position, this.src, this.thumb, this.attachment});
|
||||
|
||||
Images.fromJson(Map<String, dynamic> json) {
|
||||
id = json['id'];
|
||||
position = json['position'];
|
||||
src = json['src'];
|
||||
thumb = json['thumb'];
|
||||
attachment = json['attachment'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['id'] = this.id;
|
||||
data['position'] = this.position;
|
||||
data['src'] = this.src;
|
||||
data['thumb'] = this.thumb;
|
||||
data['attachment'] = this.attachment;
|
||||
return data;
|
||||
}
|
||||
}
|
@ -0,0 +1,24 @@
|
||||
import 'package:diplomaticquarterapp/config/config.dart';
|
||||
import 'package:diplomaticquarterapp/core/service/base_service.dart';
|
||||
import 'package:diplomaticquarterapp/models/anicllary-orders/ancillary_order_list_model.dart';
|
||||
|
||||
class AncillaryOrdersService extends BaseService {
|
||||
List<AncillaryOrdersListModel> _ancillaryLists = List();
|
||||
List<AncillaryOrdersListModel> get ancillaryLists => _ancillaryLists;
|
||||
|
||||
Future getOrders() async {
|
||||
Map<String, dynamic> body = Map();
|
||||
|
||||
hasError = false;
|
||||
|
||||
await baseAppClient.post(GET_ANCILLARY_ORDERS,
|
||||
onSuccess: (dynamic response, int statusCode) {
|
||||
response['AncillaryOrderList'].forEach((item) {
|
||||
ancillaryLists.add(AncillaryOrdersListModel.fromJson(item));
|
||||
});
|
||||
}, onFailure: (String error, int statusCode) {
|
||||
hasError = true;
|
||||
super.error = error;
|
||||
}, body: body);
|
||||
}
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
import 'package:diplomaticquarterapp/core/service/ancillary_orders_service.dart';
|
||||
|
||||
import 'base_view_model.dart';
|
||||
import '../../locator.dart';
|
||||
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
|
||||
|
||||
class AnciallryOrdersViewModel extends BaseViewModel {
|
||||
bool hasError = false;
|
||||
|
||||
AncillaryOrdersService _ancillaryService = locator<AncillaryOrdersService>();
|
||||
|
||||
Future getOrders() async {
|
||||
hasError = false;
|
||||
setState(ViewState.Busy);
|
||||
await _ancillaryService.getOrders();
|
||||
if (_ancillaryService.hasError) {
|
||||
error = _ancillaryService.error;
|
||||
setState(ViewState.ErrorLocal);
|
||||
} else
|
||||
setState(ViewState.Idle);
|
||||
}
|
||||
}
|
@ -0,0 +1,105 @@
|
||||
class AncillaryOrdersListModel {
|
||||
List<AncillaryOrderList> ancillaryOrderList;
|
||||
Null errCode;
|
||||
String message;
|
||||
int patientID;
|
||||
String patientName;
|
||||
int patientType;
|
||||
int projectID;
|
||||
String projectName;
|
||||
String setupID;
|
||||
int statusCode;
|
||||
|
||||
AncillaryOrdersListModel(
|
||||
{this.ancillaryOrderList,
|
||||
this.errCode,
|
||||
this.message,
|
||||
this.patientID,
|
||||
this.patientName,
|
||||
this.patientType,
|
||||
this.projectID,
|
||||
this.projectName,
|
||||
this.setupID,
|
||||
this.statusCode});
|
||||
|
||||
AncillaryOrdersListModel.fromJson(Map<String, dynamic> json) {
|
||||
if (json['AncillaryOrderList'] != null) {
|
||||
ancillaryOrderList = new List<AncillaryOrderList>();
|
||||
json['AncillaryOrderList'].forEach((v) {
|
||||
ancillaryOrderList.add(new AncillaryOrderList.fromJson(v));
|
||||
});
|
||||
}
|
||||
errCode = json['ErrCode'];
|
||||
message = json['Message'];
|
||||
patientID = json['PatientID'];
|
||||
patientName = json['PatientName'];
|
||||
patientType = json['PatientType'];
|
||||
projectID = json['ProjectID'];
|
||||
projectName = json['ProjectName'];
|
||||
setupID = json['SetupID'];
|
||||
statusCode = json['StatusCode'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
if (this.ancillaryOrderList != null) {
|
||||
data['AncillaryOrderList'] =
|
||||
this.ancillaryOrderList.map((v) => v.toJson()).toList();
|
||||
}
|
||||
data['ErrCode'] = this.errCode;
|
||||
data['Message'] = this.message;
|
||||
data['PatientID'] = this.patientID;
|
||||
data['PatientName'] = this.patientName;
|
||||
data['PatientType'] = this.patientType;
|
||||
data['ProjectID'] = this.projectID;
|
||||
data['ProjectName'] = this.projectName;
|
||||
data['SetupID'] = this.setupID;
|
||||
data['StatusCode'] = this.statusCode;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class AncillaryOrderList {
|
||||
String appointmentDate;
|
||||
int appointmentNo;
|
||||
int clinicID;
|
||||
String clinicName;
|
||||
int doctorID;
|
||||
String doctorName;
|
||||
String orderDate;
|
||||
int orderNo;
|
||||
|
||||
AncillaryOrderList(
|
||||
{this.appointmentDate,
|
||||
this.appointmentNo,
|
||||
this.clinicID,
|
||||
this.clinicName,
|
||||
this.doctorID,
|
||||
this.doctorName,
|
||||
this.orderDate,
|
||||
this.orderNo});
|
||||
|
||||
AncillaryOrderList.fromJson(Map<String, dynamic> json) {
|
||||
appointmentDate = json['AppointmentDate'];
|
||||
appointmentNo = json['AppointmentNo'];
|
||||
clinicID = json['ClinicID'];
|
||||
clinicName = json['ClinicName'];
|
||||
doctorID = json['DoctorID'];
|
||||
doctorName = json['DoctorName'];
|
||||
orderDate = json['OrderDate'];
|
||||
orderNo = json['OrderNo'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['AppointmentDate'] = this.appointmentDate;
|
||||
data['AppointmentNo'] = this.appointmentNo;
|
||||
data['ClinicID'] = this.clinicID;
|
||||
data['ClinicName'] = this.clinicName;
|
||||
data['DoctorID'] = this.doctorID;
|
||||
data['DoctorName'] = this.doctorName;
|
||||
data['OrderDate'] = this.orderDate;
|
||||
data['OrderNo'] = this.orderNo;
|
||||
return data;
|
||||
}
|
||||
}
|
@ -0,0 +1,43 @@
|
||||
import 'package:diplomaticquarterapp/core/viewModels/ancillary_orders_view_model.dart';
|
||||
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/health_calculator/body_fat/body_fat.dart';
|
||||
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/health_calculator/bmi_calculator/bmi_calculator.dart';
|
||||
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/health_calculator/calorie_calculator/calorie_calculator.dart';
|
||||
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/health_calculator/carbs/carbs.dart';
|
||||
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/health_calculator/ovulation_period/ovulation_period.dart';
|
||||
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
|
||||
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/data_display/medical/medical_profile_item.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
|
||||
|
||||
class AnicllaryOrders extends StatefulWidget {
|
||||
@override
|
||||
_AnicllaryOrdersState createState() => _AnicllaryOrdersState();
|
||||
}
|
||||
|
||||
class _AnicllaryOrdersState extends State<AnicllaryOrders>
|
||||
with SingleTickerProviderStateMixin {
|
||||
TabController _tabController;
|
||||
void initState() {
|
||||
super.initState();
|
||||
_tabController = TabController(length: 2, vsync: this);
|
||||
}
|
||||
|
||||
void dispose() {
|
||||
super.dispose();
|
||||
_tabController.dispose();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return BaseView<AnciallryOrdersViewModel>(
|
||||
onModelReady: (model) => model.getOrders(),
|
||||
builder: (_, model, widget) => AppScaffold(
|
||||
isShowAppBar: true,
|
||||
appBarTitle: TranslationBase.of(context).parking,
|
||||
body: SingleChildScrollView(
|
||||
padding: EdgeInsets.all(12), child: Container())));
|
||||
}
|
||||
}
|
@ -0,0 +1,997 @@
|
||||
import 'package:diplomaticquarterapp/core/model/pharmacies/recommendedProduct_model.dart';
|
||||
import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/pharmacy_module_view_model.dart';
|
||||
import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/product_detail_view_model.dart';
|
||||
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
|
||||
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
import 'package:rating_bar/rating_bar.dart';
|
||||
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
|
||||
|
||||
dynamic languageID;
|
||||
bool isInWishlist = false;
|
||||
int price = 0;
|
||||
var itemID;
|
||||
var product;
|
||||
var customerId;
|
||||
|
||||
class RecommendedProductPage extends StatefulWidget {
|
||||
String productId ;
|
||||
RecommendedProductPage({this.productId});
|
||||
|
||||
@override
|
||||
_RecommendedProductPageState createState() => _RecommendedProductPageState(productId: productId);
|
||||
}
|
||||
|
||||
class _RecommendedProductPageState extends State<RecommendedProductPage>
|
||||
with SingleTickerProviderStateMixin {
|
||||
List<RecommendedProductModel> recommendedProductList = [];
|
||||
String productId;
|
||||
_RecommendedProductPageState({this.productId});
|
||||
String id = "";
|
||||
bool styleOne = true;
|
||||
bool styleTwo = false;
|
||||
Icon styleIcon = Icon(
|
||||
Icons.widgets_sharp,
|
||||
color: Colors.blue,
|
||||
size: 29.0,
|
||||
);
|
||||
|
||||
getLanguageID() async {
|
||||
languageID = await sharedPref.getString(APP_LANGUAGE);
|
||||
}
|
||||
|
||||
// String productId = "4561";
|
||||
// String productId = "";
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
checkWishlist();
|
||||
userInfo(id, product);
|
||||
print("-------------this--------------");
|
||||
print(itemID);
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
var size = MediaQuery.of(context).size;
|
||||
final double itemHeight = ((size.height - kToolbarHeight - 24) * 0.80) / 2;
|
||||
final double itemWidth = size.width / 2;
|
||||
return BaseView<PharmacyModuleViewModel>(
|
||||
onModelReady: (model) => model.getRecommendedProducts(productId),
|
||||
builder: (_, model, wi) => AppScaffold(
|
||||
appBarTitle: TranslationBase.of(context).recommended,
|
||||
baseViewModel: model,
|
||||
isShowAppBar: true,
|
||||
isPharmacy: true,
|
||||
backgroundColor: Colors.white,
|
||||
body: SingleChildScrollView(
|
||||
child: Column(children: [
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
Container(
|
||||
padding: EdgeInsets.only(
|
||||
top: 8,
|
||||
bottom: 10,
|
||||
left: 10,
|
||||
),
|
||||
child: Text(
|
||||
model.recommendedProductList.length.toString(),
|
||||
style: TextStyle(
|
||||
color: Colors.black,
|
||||
fontSize: 14.0,
|
||||
),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
padding: EdgeInsets.only(top: 8, bottom: 10, left: 8),
|
||||
child: Text(
|
||||
TranslationBase.of(context).result,
|
||||
style: TextStyle(
|
||||
color: Colors.black,
|
||||
fontSize: 14.0,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 8),
|
||||
child: SizedBox(
|
||||
child: Container(
|
||||
width: 1,
|
||||
color: Colors.grey,
|
||||
),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
child: Image.asset(
|
||||
'assets/images/pharmacy/sort.png',
|
||||
width: 20,
|
||||
height: 20,
|
||||
// color: Colors.red,
|
||||
),
|
||||
),
|
||||
Container(
|
||||
child: Text(
|
||||
TranslationBase.of(context).sort,
|
||||
style: TextStyle(
|
||||
color: Colors.black,
|
||||
fontSize: 14.0,
|
||||
),
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 8),
|
||||
child: SizedBox(
|
||||
child: Container(
|
||||
width: 1,
|
||||
color: Colors.grey,
|
||||
),
|
||||
),
|
||||
),
|
||||
Divider(
|
||||
thickness: 1.0,
|
||||
color: Colors.black12,
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsets.all(8.0),
|
||||
child: InkWell(
|
||||
child: styleIcon,
|
||||
onTap: () {
|
||||
setState(() {
|
||||
if (styleOne == true) {
|
||||
styleOne = false;
|
||||
styleTwo = true;
|
||||
styleIcon = Icon(
|
||||
Icons.auto_awesome_mosaic,
|
||||
color: Colors.blue,
|
||||
size: 29.0,
|
||||
);
|
||||
} else {
|
||||
styleOne = true;
|
||||
styleTwo = false;
|
||||
styleIcon = Icon(
|
||||
Icons.widgets_sharp,
|
||||
color: Colors.blue,
|
||||
size: 29.0,
|
||||
);
|
||||
}
|
||||
});
|
||||
},
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
]),
|
||||
SizedBox(
|
||||
height: 2,
|
||||
),
|
||||
Divider(
|
||||
color: Colors.grey[350],
|
||||
height: 10,
|
||||
thickness: 6,
|
||||
indent: 0,
|
||||
endIndent: 0,
|
||||
),
|
||||
styleOne == true
|
||||
? Container(
|
||||
margin: EdgeInsets.all(5.0),
|
||||
child: model.recommendedProductList.length != null
|
||||
? CustomScrollView(
|
||||
primary: false,
|
||||
shrinkWrap: true,
|
||||
physics: NeverScrollableScrollPhysics(),
|
||||
slivers: <Widget>[
|
||||
SliverPadding(
|
||||
padding: const EdgeInsets.fromLTRB(0, 0, 0, 0),
|
||||
sliver: SliverGrid.count(
|
||||
crossAxisCount: 2,
|
||||
childAspectRatio: (itemWidth / itemHeight),
|
||||
children: model.recommendedProductList
|
||||
.map((e) => Card(
|
||||
elevation: 2,
|
||||
shape: RoundedRectangleBorder(
|
||||
side: BorderSide(
|
||||
color: Colors.grey[300],
|
||||
width: 2),
|
||||
borderRadius:
|
||||
BorderRadius.circular(
|
||||
10)),
|
||||
margin: EdgeInsets.symmetric(
|
||||
horizontal: 8,
|
||||
vertical: 11,
|
||||
),
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
borderRadius:
|
||||
BorderRadius.all(
|
||||
Radius.circular(15),
|
||||
),
|
||||
),
|
||||
padding: EdgeInsets.symmetric(
|
||||
horizontal: 4),
|
||||
width: MediaQuery.of(context)
|
||||
.size.width / 3,
|
||||
//
|
||||
child: Column(
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment
|
||||
.start,
|
||||
children: [
|
||||
Stack(children: [
|
||||
Container(
|
||||
child: Align(
|
||||
alignment:
|
||||
Alignment
|
||||
.topRight,
|
||||
child:
|
||||
itemID.contains(e.id)
|
||||
// !isInWishlist
|
||||
? IconButton(
|
||||
icon:
|
||||
Icon(Icons.favorite_border),
|
||||
color:
|
||||
Colors.grey,
|
||||
iconSize:
|
||||
30,
|
||||
onPressed:
|
||||
() {
|
||||
setState(() {
|
||||
addToWishlistFunction(itemID);
|
||||
});
|
||||
},
|
||||
)
|
||||
:
|
||||
IconButton(
|
||||
icon:
|
||||
Icon(Icons.favorite),
|
||||
color:
|
||||
Colors.red,
|
||||
iconSize:
|
||||
30,
|
||||
onPressed:
|
||||
() {
|
||||
setState(() {
|
||||
deleteFromWishlistFunction(itemID);
|
||||
});
|
||||
},
|
||||
)
|
||||
//
|
||||
),
|
||||
),
|
||||
Container(
|
||||
margin: EdgeInsets
|
||||
.fromLTRB(0, 16,
|
||||
10, 16),
|
||||
alignment:
|
||||
Alignment.center,
|
||||
// padding: EdgeInsets.only(left: 25, bottom: 20),
|
||||
child: (e.images !=
|
||||
null &&
|
||||
e.images.length >
|
||||
0)
|
||||
? Image.network(
|
||||
e.images[0]
|
||||
.src
|
||||
.toString(),
|
||||
// item.images[0].src,
|
||||
fit: BoxFit
|
||||
.cover,
|
||||
height: 60,
|
||||
)
|
||||
: Image.asset(
|
||||
"assets/images/no_image.png",
|
||||
fit: BoxFit
|
||||
.cover,
|
||||
height: 60,
|
||||
),
|
||||
),
|
||||
Container(
|
||||
width: e.rxMessage !=
|
||||
null
|
||||
? MediaQuery.of(
|
||||
context)
|
||||
.size
|
||||
.width /
|
||||
5
|
||||
: 0,
|
||||
padding:
|
||||
EdgeInsets.all(4),
|
||||
decoration:
|
||||
BoxDecoration(
|
||||
color: Color(
|
||||
0xffb23838),
|
||||
borderRadius:
|
||||
BorderRadius.only(
|
||||
topLeft: Radius
|
||||
.circular(
|
||||
6)),
|
||||
),
|
||||
child: Texts(
|
||||
e.rxMessage != null
|
||||
? e.rxMessage
|
||||
: "",
|
||||
color: Colors.white,
|
||||
regular: true,
|
||||
fontSize: 10,
|
||||
fontWeight:
|
||||
FontWeight.w400,
|
||||
),
|
||||
),
|
||||
]),
|
||||
Container(
|
||||
margin: EdgeInsets
|
||||
.symmetric(
|
||||
horizontal: 6,
|
||||
vertical: 0,
|
||||
),
|
||||
child: Column(
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment
|
||||
.start,
|
||||
children: [
|
||||
Text(
|
||||
languageID == "ar"
|
||||
? e.namen
|
||||
: e.name,
|
||||
style: TextStyle(
|
||||
color: Colors
|
||||
.black,
|
||||
fontSize: 13.0,
|
||||
// fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
// padding: const EdgeInsets.only(top: 15, bottom: 10),
|
||||
padding:
|
||||
const EdgeInsets
|
||||
.only(
|
||||
top: 10,
|
||||
bottom:
|
||||
5),
|
||||
child: Texts(
|
||||
"SAR ${e.price}",
|
||||
bold: true,
|
||||
fontSize: 14,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Row(
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment
|
||||
.start,
|
||||
children: <Widget>[
|
||||
Container(
|
||||
padding: EdgeInsets
|
||||
.only(
|
||||
right:
|
||||
10),
|
||||
// margin: EdgeInsets.only(left: 5),
|
||||
child: Align(
|
||||
alignment:
|
||||
Alignment
|
||||
.topLeft,
|
||||
child: RatingBar
|
||||
.readOnly(
|
||||
initialRating: e
|
||||
.approvedRatingSum
|
||||
.toDouble(),
|
||||
// initialRating: productRate,
|
||||
size: 13.0,
|
||||
filledColor:
|
||||
Colors.yellow[
|
||||
700],
|
||||
emptyColor:
|
||||
Colors.grey[
|
||||
500],
|
||||
isHalfAllowed:
|
||||
true,
|
||||
halfFilledIcon:
|
||||
Icons
|
||||
.star_half,
|
||||
filledIcon:
|
||||
Icons
|
||||
.star,
|
||||
emptyIcon:
|
||||
Icons
|
||||
.star,
|
||||
),
|
||||
),
|
||||
),
|
||||
Texts(
|
||||
"(${e.approvedTotalReviews.toString()})",
|
||||
// bold: true,
|
||||
fontSize: 12,
|
||||
),
|
||||
]),
|
||||
],
|
||||
),
|
||||
),
|
||||
)
|
||||
// Column(
|
||||
// crossAxisAlignment:
|
||||
// CrossAxisAlignment.start,
|
||||
// children: [
|
||||
// Container(
|
||||
// child: Align(
|
||||
// alignment: Alignment.topRight,
|
||||
// child: !isInWishlist
|
||||
// ? IconButton(
|
||||
// icon: Icon(Icons.favorite_border),
|
||||
// color: Colors.grey,
|
||||
// iconSize: 30,
|
||||
// onPressed: () {
|
||||
// setState(() {
|
||||
// addToWishlistFunction(itemID);
|
||||
// });
|
||||
// },
|
||||
// )
|
||||
// : IconButton(
|
||||
// icon: Icon(Icons.favorite),
|
||||
// color: Colors.red,
|
||||
// iconSize: 30,
|
||||
// onPressed: () {
|
||||
// setState(() {
|
||||
// deleteFromWishlistFunction(itemID);
|
||||
// });
|
||||
// },
|
||||
// )
|
||||
////
|
||||
// ),),
|
||||
// Container(
|
||||
// padding: EdgeInsets.only(
|
||||
// left: 25, bottom: 20),
|
||||
//// margin: EdgeInsets.fromLTRB(0, 16, 0, 0),
|
||||
//// alignment: Alignment.centerLeft,
|
||||
// child: (e.images != null &&
|
||||
// e.images.length > 0)
|
||||
// ? Image.network(
|
||||
// e.images[0].src
|
||||
// .toString(),
|
||||
//// item.images[0].src,
|
||||
// fit: BoxFit.cover,
|
||||
// height: 80,
|
||||
// )
|
||||
// : Image.asset(
|
||||
// "assets/images/no_image.png",
|
||||
// fit: BoxFit.cover,
|
||||
// height: 80,
|
||||
// ),
|
||||
// ),
|
||||
// Text(
|
||||
// e.name,
|
||||
//// model.recommendedProduct[0].products[index].shortDescription
|
||||
//// .toString(),
|
||||
// style: TextStyle(
|
||||
// color: Colors.black,
|
||||
// fontSize: 15.0,
|
||||
//// fontWeight: FontWeight.bold,
|
||||
// ),
|
||||
// ),
|
||||
// Padding(
|
||||
// padding: const EdgeInsets.only(
|
||||
// top: 15, bottom: 10),
|
||||
// child: Texts(
|
||||
// "SAR ${e.price}",
|
||||
// bold: true,
|
||||
// fontSize: 14,
|
||||
// ),
|
||||
// ),
|
||||
// Row(
|
||||
// crossAxisAlignment:
|
||||
// CrossAxisAlignment.start,
|
||||
// children: <Widget>[
|
||||
// Container(
|
||||
// padding: EdgeInsets.only(
|
||||
// right: 10),
|
||||
//// margin: EdgeInsets.only(left: 5),
|
||||
// child: Align(
|
||||
// alignment:
|
||||
// Alignment.topLeft,
|
||||
// child: RatingBar.readOnly(
|
||||
// initialRating: e
|
||||
// .approvedRatingSum
|
||||
// .toDouble(),
|
||||
//// initialRating: productRate,
|
||||
// size: 15.0,
|
||||
// filledColor:
|
||||
// Colors.yellow[700],
|
||||
// emptyColor:
|
||||
// Colors.grey[500],
|
||||
// isHalfAllowed: true,
|
||||
// halfFilledIcon:
|
||||
// Icons.star_half,
|
||||
// filledIcon: Icons.star,
|
||||
// emptyIcon: Icons.star,
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// Texts(
|
||||
// "(${e.approvedTotalReviews.toString()})",
|
||||
//// bold: true,
|
||||
// fontSize: 12,
|
||||
// ),
|
||||
// ]),
|
||||
// ],
|
||||
// ),
|
||||
)
|
||||
.toList(),
|
||||
// children:[
|
||||
// ListView.builder(
|
||||
// scrollDirection: Axis.vertical,
|
||||
// shrinkWrap: true,
|
||||
// physics: ScrollPhysics(),
|
||||
// itemCount: model.recommendedProductList.length,
|
||||
// itemBuilder: (context, index) {
|
||||
// return Container(
|
||||
// height: 30,
|
||||
// padding: EdgeInsets.only( left: 15.0, top: 10, right: 10),
|
||||
// margin: EdgeInsets.only(right: 10.0),
|
||||
// decoration: BoxDecoration(
|
||||
// border: Border.all(
|
||||
// color: Colors.grey,
|
||||
// style: BorderStyle.solid,
|
||||
// width: 1.0,
|
||||
// ),
|
||||
// color: Colors.white,
|
||||
// borderRadius: BorderRadius.circular(10.0)),
|
||||
// child: Column(
|
||||
// crossAxisAlignment: CrossAxisAlignment.start,
|
||||
// children: [
|
||||
// Container(
|
||||
// child: Align(
|
||||
// alignment: Alignment.topRight,
|
||||
// child:!isInWishlist
|
||||
// ? InkWell(
|
||||
// onTap: () {
|
||||
// },
|
||||
// child: SvgPicture.asset(
|
||||
// 'assets/images/pharmacy/heart-empty.svg',
|
||||
// width: 20,
|
||||
// height: 20,
|
||||
// color: Colors.grey,
|
||||
// ),
|
||||
// )
|
||||
// : InkWell(
|
||||
// onTap: () {
|
||||
// },
|
||||
// child: SvgPicture.asset(
|
||||
// 'assets/images/pharmacy/Redheart.svg',
|
||||
// width: 20,
|
||||
// height: 20,
|
||||
//// color: Colors.red,
|
||||
// ),
|
||||
// )
|
||||
// ),
|
||||
// ),
|
||||
// Container(
|
||||
// padding: EdgeInsets.only(left: 25, bottom: 20),
|
||||
//// margin: EdgeInsets.fromLTRB(0, 16, 0, 0),
|
||||
//// alignment: Alignment.centerLeft,
|
||||
// child: (model.recommendedProductList[index].images != null &&
|
||||
// model.recommendedProductList[index].images.length > 0)
|
||||
// ? Image.network(
|
||||
// model.recommendedProductList[index].images[0].src.toString(),
|
||||
//// item.images[0].src,
|
||||
// fit: BoxFit.cover,
|
||||
// height: 80,
|
||||
// )
|
||||
// : Image.asset(
|
||||
// "assets/images/no_image.png",
|
||||
// fit: BoxFit.cover,
|
||||
// height: 80,
|
||||
// ),
|
||||
// ),
|
||||
// Text(
|
||||
// model.recommendedProductList[index].name,
|
||||
//// model.recommendedProduct[0].products[index].shortDescription
|
||||
//// .toString(),
|
||||
// style: TextStyle(
|
||||
// color: Colors.black,
|
||||
// fontSize: 15.0,
|
||||
//// fontWeight: FontWeight.bold,
|
||||
// ),
|
||||
// ),
|
||||
// Padding(
|
||||
// padding: const EdgeInsets.only(top: 15, bottom: 10),
|
||||
// child: Texts(
|
||||
// "SAR ${model.recommendedProductList[index].price}",
|
||||
// bold: true,
|
||||
// fontSize: 14,
|
||||
// ),
|
||||
// ),
|
||||
// Row(
|
||||
// crossAxisAlignment:
|
||||
// CrossAxisAlignment.start,
|
||||
// children: <Widget>[
|
||||
// Container(
|
||||
// padding: EdgeInsets.only(right: 10),
|
||||
//// margin: EdgeInsets.only(left: 5),
|
||||
// child: Align(
|
||||
// alignment: Alignment.topLeft,
|
||||
// child: RatingBar.readOnly(
|
||||
// initialRating:
|
||||
// model.recommendedProductList[index].approvedRatingSum.toDouble(),
|
||||
//// initialRating: productRate,
|
||||
// size: 15.0,
|
||||
// filledColor: Colors.yellow[700],
|
||||
// emptyColor: Colors.grey[500],
|
||||
// isHalfAllowed: true,
|
||||
// halfFilledIcon: Icons.star_half,
|
||||
// filledIcon: Icons.star,
|
||||
// emptyIcon: Icons.star,
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// Texts(
|
||||
// "(${model.recommendedProductList[index].approvedTotalReviews.toString()})",
|
||||
//// bold: true,
|
||||
// fontSize: 12,
|
||||
// ),
|
||||
// ]),
|
||||
// ],
|
||||
// ),
|
||||
// );
|
||||
// }
|
||||
// ),
|
||||
// ]
|
||||
),
|
||||
),
|
||||
])
|
||||
: Container(),
|
||||
)
|
||||
: Container(
|
||||
height: model.recommendedProductList.length > 0
|
||||
? MediaQuery.of(context).size.height * 0.60
|
||||
: 0,
|
||||
child: ListView.builder(
|
||||
physics: ScrollPhysics(),
|
||||
// physics: NeverScrollableScrollPhysics(),
|
||||
itemCount: model.recommendedProductList.length,
|
||||
itemBuilder: (context, index) {
|
||||
return Card(
|
||||
elevation: 2,
|
||||
shape: RoundedRectangleBorder(
|
||||
side:
|
||||
BorderSide(color: Colors.grey[300], width: 2),
|
||||
borderRadius: BorderRadius.circular(10)),
|
||||
//
|
||||
margin: EdgeInsets.symmetric(
|
||||
horizontal: 8,
|
||||
vertical: 4,
|
||||
),
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.all(
|
||||
Radius.circular(15),
|
||||
),
|
||||
),
|
||||
padding: EdgeInsets.symmetric(horizontal: 5),
|
||||
width: MediaQuery.of(context).size.width / 3,
|
||||
//
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Stack(children: [
|
||||
Container(
|
||||
child: Align(
|
||||
alignment: Alignment.topRight,
|
||||
child: //true
|
||||
//wishlistVar[index].id.contains(model.recommendedProductList[index].id)
|
||||
!isInWishlist
|
||||
? IconButton(
|
||||
icon: Icon(
|
||||
Icons.favorite_border),
|
||||
color: Colors.grey,
|
||||
iconSize: 30,
|
||||
onPressed: () {
|
||||
setState(() {
|
||||
addToWishlistFunction(
|
||||
itemID);
|
||||
});
|
||||
},
|
||||
)
|
||||
: IconButton(
|
||||
icon: Icon(Icons.favorite),
|
||||
color: Colors.red,
|
||||
iconSize: 30,
|
||||
onPressed: () {
|
||||
setState(() {
|
||||
deleteFromWishlistFunction(
|
||||
itemID);
|
||||
});
|
||||
},
|
||||
)
|
||||
//
|
||||
),
|
||||
),
|
||||
Container(
|
||||
margin: EdgeInsets.fromLTRB(0, 16, 10, 16),
|
||||
alignment: Alignment.center,
|
||||
// padding: EdgeInsets.only(left: 25, bottom: 20),
|
||||
child: (model.recommendedProductList[index]
|
||||
.images !=
|
||||
null &&
|
||||
model.recommendedProductList[index]
|
||||
.images.length >
|
||||
0)
|
||||
? Image.network(
|
||||
model.recommendedProductList[index]
|
||||
.images[0].src
|
||||
.toString(),
|
||||
// item.images[0].src,
|
||||
fit: BoxFit.cover,
|
||||
height: 60,
|
||||
)
|
||||
: Image.asset(
|
||||
"assets/images/no_image.png",
|
||||
fit: BoxFit.cover,
|
||||
height: 60,
|
||||
),
|
||||
),
|
||||
Container(
|
||||
width: model.recommendedProductList[index]
|
||||
.rxMessage !=
|
||||
null
|
||||
? MediaQuery.of(context).size.width / 5
|
||||
: 0,
|
||||
padding: EdgeInsets.all(4),
|
||||
decoration: BoxDecoration(
|
||||
color: Color(0xffb23838),
|
||||
borderRadius: BorderRadius.only(
|
||||
topLeft: Radius.circular(6)),
|
||||
),
|
||||
child: Texts(
|
||||
model.recommendedProductList[index]
|
||||
.rxMessage !=
|
||||
null
|
||||
? model.recommendedProductList[index]
|
||||
.rxMessage
|
||||
: "",
|
||||
color: Colors.white,
|
||||
regular: true,
|
||||
fontSize: 10,
|
||||
fontWeight: FontWeight.w400,
|
||||
),
|
||||
),
|
||||
]),
|
||||
Container(
|
||||
margin: EdgeInsets.symmetric(
|
||||
horizontal: 6,
|
||||
vertical: 2,
|
||||
),
|
||||
child: Column(
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
model
|
||||
.recommendedProductList[index].name,
|
||||
style: TextStyle(
|
||||
color: Colors.black,
|
||||
fontSize: 13.0,
|
||||
// fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
// padding: const EdgeInsets.only(top: 15, bottom: 10),
|
||||
padding: const EdgeInsets.only(
|
||||
top: 10, bottom: 5),
|
||||
child: Texts(
|
||||
"SAR ${model.recommendedProductList[index].price}",
|
||||
bold: true,
|
||||
fontSize: 14,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Row(
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.start,
|
||||
children: <Widget>[
|
||||
Container(
|
||||
padding: EdgeInsets.only(
|
||||
right: 10, bottom: 10),
|
||||
// margin: EdgeInsets.only(left: 5),
|
||||
child: Align(
|
||||
alignment: Alignment.topLeft,
|
||||
child: RatingBar.readOnly(
|
||||
initialRating: model
|
||||
.recommendedProductList[index]
|
||||
.approvedRatingSum
|
||||
.toDouble(),
|
||||
// initialRating: productRate,
|
||||
size: 13.0,
|
||||
filledColor: Colors.yellow[700],
|
||||
emptyColor: Colors.grey[500],
|
||||
isHalfAllowed: true,
|
||||
halfFilledIcon: Icons.star_half,
|
||||
filledIcon: Icons.star,
|
||||
emptyIcon: Icons.star,
|
||||
),
|
||||
),
|
||||
),
|
||||
Texts(
|
||||
"(${model.recommendedProductList[index].approvedTotalReviews.toString()})",
|
||||
// bold: true,
|
||||
fontSize: 12,
|
||||
),
|
||||
]),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
// Container(
|
||||
// height: 30,
|
||||
// padding: EdgeInsets.only( left: 10.0, top: 10, right: 10),
|
||||
//// margin: EdgeInsets.only(right: 10.0),
|
||||
// decoration: BoxDecoration(
|
||||
// border: Border.all(
|
||||
// color: Colors.grey,
|
||||
// style: BorderStyle.solid,
|
||||
// width: 1.0,
|
||||
// ),
|
||||
// color: Colors.white,
|
||||
// borderRadius: BorderRadius.circular(10.0)),
|
||||
// child: Column(
|
||||
// crossAxisAlignment: CrossAxisAlignment.start,
|
||||
// children: [
|
||||
// Container(
|
||||
// child: Align(
|
||||
// alignment: Alignment.topRight,
|
||||
// child:!isInWishlist
|
||||
// ? InkWell(
|
||||
// onTap: () {
|
||||
// },
|
||||
// child: SvgPicture.asset(
|
||||
// 'assets/images/pharmacy/heart-empty.svg',
|
||||
// width: 20,
|
||||
// height: 20,
|
||||
// color: Colors.grey,
|
||||
// ),
|
||||
// )
|
||||
// : InkWell(
|
||||
// onTap: () {
|
||||
// },
|
||||
// child: SvgPicture.asset(
|
||||
// 'assets/images/pharmacy/Redheart.svg',
|
||||
// width: 20,
|
||||
// height: 20,
|
||||
//// color: Colors.red,
|
||||
// ),
|
||||
// )
|
||||
// ),
|
||||
// ),
|
||||
// Container(
|
||||
// padding: EdgeInsets.only(left: 25, bottom: 20),
|
||||
//// margin: EdgeInsets.fromLTRB(0, 16, 0, 0),
|
||||
//// alignment: Alignment.centerLeft,
|
||||
// child: (model.recommendedProductList[index].images != null &&
|
||||
// model.recommendedProductList[index].images.length > 0)
|
||||
// ? Image.network(
|
||||
// model.recommendedProductList[index].images[0].src.toString(),
|
||||
//// item.images[0].src,
|
||||
// fit: BoxFit.cover,
|
||||
// height: 80,
|
||||
// )
|
||||
// : Image.asset(
|
||||
// "assets/images/no_image.png",
|
||||
// fit: BoxFit.cover,
|
||||
// height: 80,
|
||||
// ),
|
||||
// ),
|
||||
// Text(
|
||||
// model.recommendedProductList[index].name,
|
||||
//// model.recommendedProduct[0].products[index].shortDescription
|
||||
//// .toString(),
|
||||
// style: TextStyle(
|
||||
// color: Colors.black,
|
||||
// fontSize: 15.0,
|
||||
//// fontWeight: FontWeight.bold,
|
||||
// ),
|
||||
// ),
|
||||
// Padding(
|
||||
// padding: const EdgeInsets.only(top: 15, bottom: 10),
|
||||
// child: Texts(
|
||||
// "SAR ${model.recommendedProductList[index].price}",
|
||||
// bold: true,
|
||||
// fontSize: 14,
|
||||
// ),
|
||||
// ),
|
||||
// Row(
|
||||
// crossAxisAlignment:
|
||||
// CrossAxisAlignment.start,
|
||||
// children: <Widget>[
|
||||
// Container(
|
||||
// padding: EdgeInsets.only(right: 10),
|
||||
//// margin: EdgeInsets.only(left: 5),
|
||||
// child: Align(
|
||||
// alignment: Alignment.topLeft,
|
||||
// child: RatingBar.readOnly(
|
||||
// initialRating:
|
||||
// model.recommendedProductList[index].approvedRatingSum.toDouble(),
|
||||
//// initialRating: productRate,
|
||||
// size: 15.0,
|
||||
// filledColor: Colors.yellow[700],
|
||||
// emptyColor: Colors.grey[500],
|
||||
// isHalfAllowed: true,
|
||||
// halfFilledIcon: Icons.star_half,
|
||||
// filledIcon: Icons.star,
|
||||
// emptyIcon: Icons.star,
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// Texts(
|
||||
// "(${model.recommendedProductList[index].approvedTotalReviews.toString()})",
|
||||
//// bold: true,
|
||||
// fontSize: 12,
|
||||
// ),
|
||||
// ]),
|
||||
// ],
|
||||
// ),
|
||||
// );
|
||||
}),
|
||||
),
|
||||
]),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
checkWishlist() async {
|
||||
ProductDetailViewModel x = new ProductDetailViewModel();
|
||||
await x.checkWishlistData();
|
||||
for (int i = 0; i < x.wishListItems.length; i++) {
|
||||
// itemID = x.wishListItems[i].id;
|
||||
print("-------------wishlist---------------");
|
||||
print(itemID);
|
||||
// print(product.id);
|
||||
print(x.wishListItems[i].productId);
|
||||
if (itemID == x.wishListItems[i].productId) {
|
||||
isInWishlist = true;
|
||||
// print('in wishlist');
|
||||
break;
|
||||
} else {
|
||||
isInWishlist = false;
|
||||
// print('not in wishlist');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Future userInfo(id, product) async {
|
||||
customerId = await sharedPref.getString(PHARMACY_CUSTOMER_ID);
|
||||
if (customerId != null) {
|
||||
itemID = id;
|
||||
product = product;
|
||||
checkWishlist();
|
||||
}
|
||||
print("customerId:$customerId");
|
||||
return customerId;
|
||||
}
|
||||
|
||||
|
||||
addToWishlistFunction(itemID) async {
|
||||
ProductDetailViewModel x = new ProductDetailViewModel();
|
||||
isInWishlist = true;
|
||||
await x.addToWishlistData(itemID);
|
||||
}
|
||||
|
||||
deleteFromWishlistFunction(itemID) async {
|
||||
ProductDetailViewModel x = new ProductDetailViewModel();
|
||||
isInWishlist = false;
|
||||
await x.addToWishlistData(itemID);
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,40 @@
|
||||
import 'package:diplomaticquarterapp/config/config.dart';
|
||||
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
|
||||
import 'package:diplomaticquarterapp/core/model/pharmacies/recommendedProduct_model.dart';
|
||||
import 'package:diplomaticquarterapp/core/service/base_service.dart';
|
||||
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
|
||||
import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart';
|
||||
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
|
||||
|
||||
|
||||
|
||||
|
||||
class RecommendedProductService extends BaseService{
|
||||
AppSharedPreferences sharedPref = AppSharedPreferences();
|
||||
AppGlobal appGlobal = new AppGlobal();
|
||||
AuthenticatedUser authUser = new AuthenticatedUser();
|
||||
AuthProvider authProvider = new AuthProvider();
|
||||
|
||||
List<Products> _recommendedProductList = List();
|
||||
List<Products> get recommendedList => _recommendedProductList;
|
||||
String url ="";
|
||||
|
||||
Future getRecommendedProducts(productId) async {
|
||||
hasError = false;
|
||||
url =GET_RECOMMENDED_PRODUCT+productId;
|
||||
await baseAppClient.getPharmacy(url,
|
||||
onSuccess: (dynamic response, int statusCode) {
|
||||
_recommendedProductList.clear();
|
||||
response['products'].forEach((item) {
|
||||
_recommendedProductList.add(Products.fromJson(item));
|
||||
print("----------------------------------");
|
||||
print("Test data");
|
||||
print(_recommendedProductList[0]);
|
||||
print(item['name']);
|
||||
print(response);
|
||||
});
|
||||
}, onFailure: (String error, int statusCode) {
|
||||
hasError = true;
|
||||
super.error = error;
|
||||
});
|
||||
}}
|
Loading…
Reference in New Issue