Merge branch 'development' into Haroon

merge-requests/382/head
haroon amjad 3 years ago
commit 4c2b70fcb5

@ -513,7 +513,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";

@ -1,143 +1,132 @@
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,
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.metaKeywords,
// this.metaDescription,
// this.metaTitle,
this.allowCustomerReviews,
this.approvedRatingSum,
this.notApprovedRatingSum,
@ -146,17 +135,17 @@ class Products {
this.sku,
this.isRx,
this.prescriptionRequired,
this.rxMessage,
this.rxMessagen,
this.manufacturerPartNumber,
this.gtin,
// this.rxMessage,
// this.rxMessagen,
// 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,
@ -182,19 +171,19 @@ class Products {
this.allowBackInStockSubscriptions,
this.orderMinimumQuantity,
this.orderMaximumQuantity,
this.allowedQuantities,
// this.allowedQuantities,
this.allowAddingOnlyExistingAttributeCombinations,
this.disableBuyButton,
this.disableWishlistButton,
this.availableForPreOrder,
this.preOrderAvailabilityStartDateTimeUtc,
// this.preOrderAvailabilityStartDateTimeUtc,
this.callForPrice,
this.price,
this.oldPrice,
this.productCost,
this.specialPrice,
this.specialPriceStartDateTimeUtc,
this.specialPriceEndDateTimeUtc,
// this.specialPrice,
// this.specialPriceStartDateTimeUtc,
// this.specialPriceEndDateTimeUtc,
this.customerEntersPrice,
this.minimumCustomerEnteredPrice,
this.maximumCustomerEnteredPrice,
@ -203,19 +192,19 @@ class Products {
this.basepriceBaseAmount,
this.hasTierPrices,
this.hasDiscountsApplied,
this.discountName,
this.discountNamen,
this.discountDescription,
this.discountDescriptionn,
this.discountPercentage,
// 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.availableStartDateTimeUtc,
// this.availableEndDateTimeUtc,
this.displayOrder,
this.published,
this.deleted,
@ -223,25 +212,40 @@ class Products {
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.images,
});
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,10 +254,10 @@ 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 =
@ -261,7 +265,7 @@ class 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'];
@ -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'];
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);

@ -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,
),
));
}

@ -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,15 +58,27 @@ class _NewCMCStepTowPageState extends State<NewCMCStepTowPage> {
super.initState();
}
setLatitudeAndLongitude({bool isSetState = false, String latLong}) {
if (latLong == null)
setLatitudeAndLongitude({bool isSetState = false, String latLong}) async {
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]);
}
}
@override
Widget build(BuildContext context) {
@ -144,8 +158,10 @@ class _NewCMCStepTowPageState extends State<NewCMCStepTowPage> {
);
},
initialPosition: LatLng(latitude, longitude),
useCurrentLocation: false,
useCurrentLocation: showCurrentLocation,
),
if(widget.model.addressesList.isNotEmpty)
Container(
child: InkWell(
onTap: () =>

@ -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,
),
));
}

@ -46,6 +46,8 @@ class _NewHomeHealthCareStepTowPageState
double latitude = 0;
double longitude = 0;
AddressInfo _selectedAddress;
bool showCurrentLocation = false;
@override
void initState() {
@ -60,15 +62,27 @@ class _NewHomeHealthCareStepTowPageState
}
setLatitudeAndLongitude({bool isSetState = false, String latLong}) {
if (latLong == null)
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]);
}
}
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
@ -147,8 +161,9 @@ class _NewHomeHealthCareStepTowPageState
);
},
initialPosition: LatLng(latitude, longitude),
useCurrentLocation: false,
useCurrentLocation: showCurrentLocation,
),
if(widget.model.addressesList.isNotEmpty)
Container(
child: InkWell(
onTap: () =>

@ -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";
}
}

@ -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 {

File diff suppressed because it is too large Load Diff

@ -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;

Loading…
Cancel
Save