From bdededa39781124528b9a29e39c2d9a1e00fc259 Mon Sep 17 00:00:00 2001 From: Fatimah Alshammari Date: Wed, 22 Sep 2021 13:51:03 +0300 Subject: [PATCH 1/4] fixed arabic version --- lib/pages/pharmacies/my_reviews.dart | 4 +- lib/pages/pharmacy/order/Order.dart | 15 +++--- lib/pages/pharmacy/order/OrderDetails.dart | 33 ++++++++++-- lib/pages/sub_categorise_page.dart | 62 ++++++---------------- 4 files changed, 54 insertions(+), 60 deletions(-) diff --git a/lib/pages/pharmacies/my_reviews.dart b/lib/pages/pharmacies/my_reviews.dart index 7e7e33a0..efb93f96 100644 --- a/lib/pages/pharmacies/my_reviews.dart +++ b/lib/pages/pharmacies/my_reviews.dart @@ -44,8 +44,8 @@ class _MyReviewsPageState extends State { ), Padding( padding: const EdgeInsets.all(8.0), - child: Text( - 'There is no data', + child: Text(TranslationBase.of(context).noData, +// 'There is no data', style: TextStyle(fontSize: 30), ), ) diff --git a/lib/pages/pharmacy/order/Order.dart b/lib/pages/pharmacy/order/Order.dart index 2ba92674..7ffcbdbd 100644 --- a/lib/pages/pharmacy/order/Order.dart +++ b/lib/pages/pharmacy/order/Order.dart @@ -243,9 +243,10 @@ class _OrderPageState extends State color: Colors.blue[700], borderRadius: BorderRadius.circular(30.0)), - child: deliveredOrderList[index] - .orderStatusId == - 30 + child: deliveredOrderList[index].orderStatusId == 30 || + deliveredOrderList[index].orderStatusId == 997 || + deliveredOrderList[index].orderStatusId == 994 +// deliveredOrderList[index].orderStatusId == 30 ? Text( // deliveredOrderList[0].orderStatus.toString().substring(12), TranslationBase.of(context) @@ -508,9 +509,11 @@ class _OrderPageState extends State color: Colors.green, borderRadius: BorderRadius.circular(30.0)), - child: processingOrderList[index] - .orderStatusId == - 20 + child: processingOrderList[index].orderStatusId == 20 || + processingOrderList[index].orderStatusId == 995 || + processingOrderList[index].orderStatusId == 998 || + processingOrderList[index].orderStatusId == 999 +// processingOrderList[index].orderStatusId == 20 ? Text( // deliveredOrderList[0].orderStatus.toString().substring(12), TranslationBase.of(context) diff --git a/lib/pages/pharmacy/order/OrderDetails.dart b/lib/pages/pharmacy/order/OrderDetails.dart index 2f113e50..1275042a 100644 --- a/lib/pages/pharmacy/order/OrderDetails.dart +++ b/lib/pages/pharmacy/order/OrderDetails.dart @@ -121,17 +121,40 @@ class _OrderDetailsPageState extends State { ), color: getStatusBackgroundColor(), borderRadius: BorderRadius.circular(30.0)), - child: Text( + child: model.orderListModel[0].orderStatusId == 30 || + model.orderListModel[0].orderStatusId == 997 || + model.orderListModel[0].orderStatusId == 994 +// deliveredOrderList[index].orderStatusId == 30 + ? Text( +// deliveredOrderList[0].orderStatus.toString().substring(12), + TranslationBase.of(context).deliveredOrder, + style: TextStyle( + color: Colors.white, + fontSize: 15.0, + fontWeight: FontWeight.bold, + ), + ) + : Text( languageID == "ar" - ? model.orderListModel[0].orderStatusn - : model.orderListModel[0].orderStatus, -// TranslationBase.of(context).delivered, + ? model.orderListModel[0].orderStatusn.toString() + : model.orderListModel[0].orderStatus.toString(), style: TextStyle( color: Colors.white, fontSize: 13.0, fontWeight: FontWeight.bold, ), - ), + ) +// Text( +// languageID == "ar" +// ? model.orderListModel[0].orderStatusn +// : model.orderListModel[0].orderStatus, +//// TranslationBase.of(context).delivered, +// style: TextStyle( +// color: Colors.white, +// fontSize: 13.0, +// fontWeight: FontWeight.bold, +// ), +// ), ), ], ), diff --git a/lib/pages/sub_categorise_page.dart b/lib/pages/sub_categorise_page.dart index 084f2a8c..c7439044 100644 --- a/lib/pages/sub_categorise_page.dart +++ b/lib/pages/sub_categorise_page.dart @@ -540,61 +540,29 @@ class _SubCategorisePageState extends State { width: 200, child: Button( onTap: - () async { - String - categoriesId = - ""; - for (CategoriseParentModel category - in entityList) { - if (categoriesId == - "") { - categoriesId = - category - .id; + () async {String categoriesId = ""; + for (CategoriseParentModel category in entityList) { + if (categoriesId == "") {categoriesId = category.id; } else { - categoriesId = - "$categoriesId,${category.id}"; + categoriesId = "$categoriesId,${category.id}"; } } - String - brandIds = - ""; - for (CategoriseParentModel brand - in entityListBrands) { - if (brandIds == - "") { - brandIds = - brand - .id; + String brandIds = ""; + for (CategoriseParentModel brand in entityListBrands) { + if (brandIds == "") {brandIds = brand.id; } else { - brandIds = - "$brandIds,${brand.id}"; + brandIds = "$brandIds,${brand.id}"; } } - GifLoaderDialogUtils - .showMyDialog( - context); + GifLoaderDialogUtils.showMyDialog(context); - await model.getFilteredSubProducts( - min: minField - .text - .toString(), - max: maxField - .text - .toString(), - categoryId: - categoriesId, - brandId: - brandIds); - GifLoaderDialogUtils - .hideDialog( - context); - Navigator.pop( - context); + await model.getFilteredSubProducts(min: minField.text.toString(), + max: maxField.text.toString(), categoryId: categoriesId, + brandId: brandIds); + GifLoaderDialogUtils.hideDialog(context); + Navigator.pop(context); }, - label: TranslationBase.of( - context) - .apply, + label: TranslationBase.of(context).apply, // 'Apply', backgroundColor: Colors From 4309952b170d5520e679628bd3bff464b3425e06 Mon Sep 17 00:00:00 2001 From: Fatimah Alshammari Date: Thu, 7 Oct 2021 10:12:33 +0300 Subject: [PATCH 2/4] fixed subCategories --- lib/config/config.dart | 12 +- lib/pages/parent_categorise_page.dart | 135 ++++++++++-------- lib/pages/pharmacies/my_reviews.dart | 4 +- lib/pages/pharmacies/wishlist.dart | 3 +- lib/pages/sub_categories_modalsheet.dart | 108 ++++++++++++++ .../pharmacy_services/review_service.dart | 2 + 6 files changed, 198 insertions(+), 66 deletions(-) create mode 100644 lib/pages/sub_categories_modalsheet.dart diff --git a/lib/config/config.dart b/lib/config/config.dart index 5af95569..2e7213c0 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -13,16 +13,16 @@ const PACKAGES_CUSTOMER = '/api/customers'; const PACKAGES_SHOPPING_CART = '/api/shopping_cart_items'; const PACKAGES_ORDERS = '/api/orders'; -const BASE_URL = 'https://uat.hmgwebservices.com/'; -// const BASE_URL = 'https://hmgwebservices.com/'; +//const BASE_URL = 'https://uat.hmgwebservices.com/'; +const BASE_URL = 'https://hmgwebservices.com/'; // Pharmacy UAT URLs -const BASE_PHARMACY_URL = 'https://uat.hmgwebservices.com/epharmacy/api/'; -const PHARMACY_BASE_URL = 'https://uat.hmgwebservices.com/epharmacy/api/'; +//const BASE_PHARMACY_URL = 'https://uat.hmgwebservices.com/epharmacy/api/'; +// const PHARMACY_BASE_URL = 'https://uat.hmgwebservices.com/epharmacy/api/'; // Pharmacy Production URLs -// const BASE_PHARMACY_URL = 'https://mdlaboratories.com/exacartapi/api/'; -// const PHARMACY_BASE_URL = 'https://mdlaboratories.com/exacartapi/api/'; + const BASE_PHARMACY_URL = 'https://mdlaboratories.com/exacartapi/api/'; + const PHARMACY_BASE_URL = 'https://mdlaboratories.com/exacartapi/api/'; const PING_SERVICE = 'Services/Weather.svc/REST/CheckConnectivity'; diff --git a/lib/pages/parent_categorise_page.dart b/lib/pages/parent_categorise_page.dart index 40bf2dc7..79b49871 100644 --- a/lib/pages/parent_categorise_page.dart +++ b/lib/pages/parent_categorise_page.dart @@ -16,7 +16,7 @@ import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; - +import 'package:diplomaticquarterapp/pages/sub_categories_modalsheet.dart'; import 'base/base_view.dart'; class ParentCategorisePage extends StatefulWidget { @@ -114,56 +114,65 @@ class _ParentCategorisePageState extends State { ), ), onTap: () { - showModalBottomSheet( - isScrollControlled: true, - context: context, - builder: (BuildContext context) { - return Container( - // height: MediaQuery.of(context) - // .size - // .height * - // 0.89, - color: Colors.white, - child: Center( - child: ListView.builder( - scrollDirection: Axis.vertical, - itemCount: model.categoriseParent.length, - itemBuilder: (BuildContext context, int index) { - return Container( - child: Padding( - padding: EdgeInsets.all(4.0), - child: InkWell( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Texts(projectViewModel.isArabic - ? model.categoriseParent[index].namen - : model.categoriseParent[index].name), - Divider( - thickness: 0.6, - color: Colors.black12, - ) - ], - ), - onTap: () { - Navigator.push( - context, - FadePage( - page: SubCategorisePage( - title: model.categoriseParent[index].name, - id: model.categoriseParent[index].id, - parentId: id, - )), - ); - }, - ), - ), - ); - }), - ), - ); - }, + Navigator.push( + context, + FadePage( + page: SubCategoriseModalsheet( +// id: model.categorise[0].id, +// titleName: model.categorise[0].name, + ) + ), ); +// showModalBottomSheet( +// isScrollControlled: true, +// context: context, +// builder: (BuildContext context) { +// return Container( +// // height: MediaQuery.of(context) +// // .size +// // .height * +// // 0.89, +// color: Colors.white, +// child: Center( +// child: ListView.builder( +// scrollDirection: Axis.vertical, +// itemCount: model.categoriseParent.length, +// itemBuilder: (BuildContext context, int index) { +// return Container( +// child: Padding( +// padding: EdgeInsets.all(4.0), +// child: InkWell( +// child: Column( +// crossAxisAlignment: CrossAxisAlignment.start, +// children: [ +// Texts(projectViewModel.isArabic +// ? model.categoriseParent[index].namen +// : model.categoriseParent[index].name), +// Divider( +// thickness: 0.6, +// color: Colors.black12, +// ) +// ], +// ), +// onTap: () { +// Navigator.push( +// context, +// FadePage( +// page: SubCategorisePage( +// title: model.categoriseParent[index].name, +// id: model.categoriseParent[index].id, +// parentId: id, +// )), +// ); +// }, +// ), +// ), +// ); +// }), +// ), +// ); +// }, +// ); }, ), ), @@ -300,7 +309,8 @@ class _ParentCategorisePageState extends State { width: 10.0, ), Texts( - 'Refine', + TranslationBase.of(context).refine, +// 'Refine', fontWeight: FontWeight.w600, ), SizedBox( @@ -308,7 +318,8 @@ class _ParentCategorisePageState extends State { ), InkWell( child: Texts( - 'Close', +// 'Close', + TranslationBase.of(context).closeIt, color: Colors.red, fontWeight: FontWeight.w600, fontSize: 15.0, @@ -327,7 +338,9 @@ class _ParentCategorisePageState extends State { Column( children: [ ExpansionTile( - title: Texts('Categorise'), + title: Texts( TranslationBase.of( + context) + .categorise), children: [ ProcedureListWidget( model: model, @@ -356,7 +369,9 @@ class _ParentCategorisePageState extends State { color: Colors.black12, ), ExpansionTile( - title: Texts('Brands'), + title: Texts( TranslationBase.of( + context) + .brands), children: [ ProcedureListWidget( model: model, @@ -385,7 +400,9 @@ class _ParentCategorisePageState extends State { color: Colors.black12, ), ExpansionTile( - title: Texts('Price'), + title: Texts( TranslationBase.of( + context) + .price), children: [ Container( color: Color(0xffEEEEEE), @@ -446,7 +463,9 @@ class _ParentCategorisePageState extends State { Container( width: 100, child: Button( - label: 'Reset', + label: TranslationBase.of( + context) + .reset, backgroundColor: Colors.red, ), ), @@ -486,7 +505,9 @@ class _ParentCategorisePageState extends State { Navigator.pop(context); }, - label: 'Apply', + label: TranslationBase.of( + context) + .apply, backgroundColor: Colors.green, ), ), diff --git a/lib/pages/pharmacies/my_reviews.dart b/lib/pages/pharmacies/my_reviews.dart index efb93f96..029f8ca4 100644 --- a/lib/pages/pharmacies/my_reviews.dart +++ b/lib/pages/pharmacies/my_reviews.dart @@ -121,7 +121,7 @@ reviewDetails(data, rate, myRate) { : data.product.name, style: TextStyle( color: Colors.black54, - fontSize: languageID == 'ar' ? 7 : 13, + fontSize: languageID == 'ar' ? 12 : 13, fontWeight: FontWeight.bold), ), ), @@ -187,7 +187,7 @@ reviewDetails(data, rate, myRate) { padding: languageID == 'ar' ? EdgeInsets.only(right: 10) : EdgeInsets.only(left: 10), - child: Text(data.createdOnUtc.toString())), + child: Text(data.createdOnUtc.toString().substring(0 , 11))), ], ), ), diff --git a/lib/pages/pharmacies/wishlist.dart b/lib/pages/pharmacies/wishlist.dart index b75f709b..c90f2138 100644 --- a/lib/pages/pharmacies/wishlist.dart +++ b/lib/pages/pharmacies/wishlist.dart @@ -42,7 +42,8 @@ class _WishlistPageState extends State { Padding( padding: const EdgeInsets.all(8.0), child: Text( - 'There is no data', + TranslationBase.of(context).noData, +// 'There is no data', style: TextStyle(fontSize: 30), ), ) diff --git a/lib/pages/sub_categories_modalsheet.dart b/lib/pages/sub_categories_modalsheet.dart new file mode 100644 index 00000000..f1ff0e08 --- /dev/null +++ b/lib/pages/sub_categories_modalsheet.dart @@ -0,0 +1,108 @@ + +import 'package:diplomaticquarterapp/core/model/pharmacy/categorise_parent_model.dart'; +import 'package:diplomaticquarterapp/core/model/pharmacy/pharmacy_categorise.dart'; +import 'package:diplomaticquarterapp/core/viewModels/pharmacy_categorise_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/pages/sub_categorise_page.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_pharmacy_widget.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +import 'package:flutter/material.dart'; +import 'base/base_view.dart'; +import 'package:provider/provider.dart'; + + + + +class SubCategoriseModalsheet extends StatefulWidget { + String id; + String titleName; + + SubCategoriseModalsheet({this.id, this.titleName}); + @override + _SubCategoriseModalsheetState createState() => _SubCategoriseModalsheetState(id: id, titleName: titleName); + +} + +class _SubCategoriseModalsheetState extends State { + String id; + String titleName; +// List categoriesList = []; + _SubCategoriseModalsheetState({this.id, this.titleName}); + + @override + Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); + return BaseView( + onModelReady: (model) => model.getCategoriseParent(i: id), + builder: (_, model, wi) => AppScaffold( + // appBarTitle: titleName, + appBarTitle: TranslationBase.of(context).categorise, + isBottomBar: false, + isShowAppBar: true, + backgroundColor: Colors.white, + isShowDecPage: false, + baseViewModel: model, + body: Container( + color: Colors.white, + child: Center( + child: ListView.builder( + scrollDirection: Axis.vertical, + itemCount: model.categoriseParent.length, + itemBuilder: (BuildContext context, int index) { + return Container( + child: Padding( + padding: EdgeInsets.all(4.0), + child: InkWell( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Texts(projectViewModel.isArabic + ? model.categoriseParent[index].namen + : model.categoriseParent[index].name), + SizedBox( + height: 10, + ), + Divider( + thickness: 0.6, + color: Colors.black12, + ) + ], + ), + onTap: () { + Navigator.push( + context, + FadePage( + page: SubCategorisePage( + title: model.categoriseParent[index].name, + id: model.categoriseParent[index].id, + parentId: id, + )), + ); + }, + ), + ), + ); + }), + ), + ), + + ), + ); + } +// getCatName() { +// +// if (widget.id == '1' ) +// return Texts("text1"); +// else if (widget.id == '2' ) +// return Texts("text2"); +// else if (widget.id == '3') +// return Texts("text3"); +// else if (widget.id == '4' ) +// return Texts("text4"); +// } + + +} \ No newline at end of file diff --git a/lib/services/pharmacy_services/review_service.dart b/lib/services/pharmacy_services/review_service.dart index 44839955..c85d68e2 100644 --- a/lib/services/pharmacy_services/review_service.dart +++ b/lib/services/pharmacy_services/review_service.dart @@ -28,6 +28,8 @@ class ReviewService extends BaseService { _reviewList.clear(); response['reviews'].forEach((item) { _reviewList.add(Review.fromJson(item)); + print (response); + print (item['reviewText']); }); }, onFailure: (String error, int statusCode) { hasError = true; From 74929f76e56505525a652cd4b0294342ae342d06 Mon Sep 17 00:00:00 2001 From: Fatimah Alshammari Date: Thu, 7 Oct 2021 12:37:16 +0300 Subject: [PATCH 3/4] edit home page --- .../screens/pharmacy_module_page.dart | 291 +----------------- 1 file changed, 1 insertion(+), 290 deletions(-) diff --git a/lib/pages/pharmacies/screens/pharmacy_module_page.dart b/lib/pages/pharmacies/screens/pharmacy_module_page.dart index 9b91b77a..0842f5e5 100644 --- a/lib/pages/pharmacies/screens/pharmacy_module_page.dart +++ b/lib/pages/pharmacies/screens/pharmacy_module_page.dart @@ -63,9 +63,6 @@ class _PharmacyPageState extends State { String id = ""; @override void initState() { - checkWishlist(); - // userInfo(widget.product.id, widget.product); - userInfo(id, product); getLanguageID(); } @@ -333,238 +330,7 @@ class _PharmacyPageState extends State { : Container(), ), ), -// Container( -// margin: EdgeInsets.fromLTRB(10, 10, 10, 10), -// child: Row( -// mainAxisAlignment: MainAxisAlignment.spaceBetween, -// children: [ -// Texts( -// TranslationBase.of(context).recommended, -// bold: true, -// ), -// BorderedButton( -// TranslationBase.of(context).viewAll, -// hasBorder: true, -// borderColor: Colors.green, -// textColor: Colors.green, -// vPadding: 6, -// hPadding: 4, -// handler: () { -// Navigator.push( -// context, -// MaterialPageRoute( -// builder: (context) => -// RecommendedProductPage(productId : "2316"))); -// }, -// ), -// ], -// ), -// ), -// Container( -// height: model.recommendedProductList.length > 0 -// ? MediaQuery.of(context).size.height * 0.32 -// : 0, -// margin: EdgeInsets.symmetric(horizontal: 6, vertical: 4), -//// padding: EdgeInsets.symmetric(horizontal: 5.0, vertical: 22.0), -//// margin: EdgeInsets.only(left: 10), -// child: BaseView( -// onModelReady: (model) => -// model.getRecommendedProducts(productId), -// builder: (_, model, wi) => model -// .recommendedProductList.length != -// null -// ? ListView.builder( -// scrollDirection: Axis.horizontal, -// shrinkWrap: true, -// 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: 0, -// ), -// 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: //true -// itemID.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: 0, -// ), -// child: Column( -// crossAxisAlignment: -// CrossAxisAlignment.start, -// children: [ -// Text( -// languageID == "ar" -// ? model.recommendedProductList[index].namen -// : 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: [ -// 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: 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( -//// child: Text("NO DATA"), -// ), -// ), -// ), + Container( margin: EdgeInsets.fromLTRB(10, 10, 10, 0), child: Row( @@ -688,48 +454,6 @@ class _PharmacyPageState extends State { ); } - 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); - } - - 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; - } } class GridViewButtons extends StatelessWidget { @@ -887,17 +611,4 @@ class _testState extends State { return Container(); } } -//addWishlistData() async { -// ProductDetailViewModel x = new ProductDetailViewModel(); -// await wishlistData.add(x.checkWishlistData()); -// print("-------------testWishlist---------------"); -// -//} -// checkWishlist() async { -// ProductDetailViewModel x = new ProductDetailViewModel(); -// wishlistVar = await x.checkWishlistData(); -// print("wishlistVar>>>>>>>>>>>>>>>"); -// print(wishlistVar); -// -// } From ac63f0963356b143901c027810601971d91320f6 Mon Sep 17 00:00:00 2001 From: Fatimah Alshammari Date: Thu, 7 Oct 2021 15:40:34 +0300 Subject: [PATCH 4/4] edit arabic version --- lib/pages/parent_categorise_page.dart | 34 +++++++++------------------ 1 file changed, 11 insertions(+), 23 deletions(-) diff --git a/lib/pages/parent_categorise_page.dart b/lib/pages/parent_categorise_page.dart index 6862bcd7..ff1fc5b7 100644 --- a/lib/pages/parent_categorise_page.dart +++ b/lib/pages/parent_categorise_page.dart @@ -334,15 +334,13 @@ class _ParentCategorisePageState extends State { width: 10.0, ), Texts( -<<<<<<< HEAD + TranslationBase.of(context).refine, // 'Refine', - fontWeight: FontWeight.w600, -======= - 'Refine', + fontWeight: FontWeight.w600, ->>>>>>> bcd99555e3e980ea8ec5f30a74c9e167c8520d9f + ), SizedBox( width: 250.0, @@ -371,14 +369,10 @@ class _ParentCategorisePageState extends State { Column( children: [ ExpansionTile( -<<<<<<< HEAD + title: Texts( TranslationBase.of( context) .categorise), -======= - title: - Texts('Categorise'), ->>>>>>> bcd99555e3e980ea8ec5f30a74c9e167c8520d9f children: [ ProcedureListWidget( model: model, @@ -550,16 +544,14 @@ class _ParentCategorisePageState extends State { Container( width: 100, child: Button( -<<<<<<< HEAD + label: TranslationBase.of( context) .reset, backgroundColor: Colors.red, -======= - label: 'Reset', - backgroundColor: - Colors.red, ->>>>>>> bcd99555e3e980ea8ec5f30a74c9e167c8520d9f + + + ), ), SizedBox( @@ -623,17 +615,13 @@ class _ParentCategorisePageState extends State { Navigator.pop( context); }, -<<<<<<< HEAD + label: TranslationBase.of( context) .apply, backgroundColor: Colors.green, -======= - label: 'Apply', - backgroundColor: - Colors - .green, ->>>>>>> bcd99555e3e980ea8ec5f30a74c9e167c8520d9f + + ), ), ],