From 50f203cd558fe9c5dd93710af71db282522425ea Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Mon, 29 Aug 2022 13:44:04 +0300 Subject: [PATCH] Updates & fixes --- .../items_for_sale/get_employee_ads_list.dart | 10 +- .../get_ccp_dff_structure_model.dart | 20 -- .../items_for_sale/item_for_sale_detail.dart | 184 +++++++------- lib/ui/screens/my_requests/my_requests.dart | 236 +++++++++--------- lib/ui/screens/my_requests/new_request.dart | 29 +-- .../offers_and_discounts_details.dart | 91 +++---- 6 files changed, 267 insertions(+), 303 deletions(-) diff --git a/lib/models/items_for_sale/get_employee_ads_list.dart b/lib/models/items_for_sale/get_employee_ads_list.dart index 17a2180..68aa805 100644 --- a/lib/models/items_for_sale/get_employee_ads_list.dart +++ b/lib/models/items_for_sale/get_employee_ads_list.dart @@ -22,11 +22,10 @@ class EmployeePostedAds { String? status; List? itemAttachments; String? created; - dynamic? comments; - dynamic? isActive; + bool? isActive; int? pageSize; int? pageNo; - dynamic? languageId; + int? languageId; EmployeePostedAds( {this.itemSaleID, @@ -52,7 +51,6 @@ class EmployeePostedAds { this.status, this.itemAttachments, this.created, - this.comments, this.isActive, this.pageSize, this.pageNo, @@ -87,7 +85,6 @@ class EmployeePostedAds { }); } created = json['created']; - comments = json['comments']; isActive = json['isActive']; pageSize = json['pageSize']; pageNo = json['pageNo']; @@ -122,7 +119,6 @@ class EmployeePostedAds { this.itemAttachments!.map((v) => v.toJson()).toList(); } data['created'] = this.created; - data['comments'] = this.comments; data['isActive'] = this.isActive; data['pageSize'] = this.pageSize; data['pageNo'] = this.pageNo; @@ -137,7 +133,7 @@ class ItemAttachments { String? contentType; String? attachFileStream; String? base64String; - dynamic? isActive; + bool? isActive; int? referenceItemId; String? content; String? filePath; diff --git a/lib/models/my_requests/get_ccp_dff_structure_model.dart b/lib/models/my_requests/get_ccp_dff_structure_model.dart index 878cec4..f5e80cf 100644 --- a/lib/models/my_requests/get_ccp_dff_structure_model.dart +++ b/lib/models/my_requests/get_ccp_dff_structure_model.dart @@ -13,7 +13,6 @@ class GetCCPDFFStructureModel { String? dISPLAYFLAG; String? eNABLEDFLAG; ESERVICESDV? eSERVICESDV; - // List? eSERVICESVS; String? fLEXVALUESETNAME; String? fORMATTYPE; String? fORMATTYPEDSP; @@ -95,12 +94,6 @@ class GetCCPDFFStructureModel { eSERVICESDV = json['E_SERVICES_DV'] != null ? new ESERVICESDV.fromJson(json['E_SERVICES_DV']) : null; - // if (json['E_SERVICES_VS'] != null) { - // eSERVICESVS = []; - // json['E_SERVICES_VS'].forEach((v) { - // eSERVICESVS!.add(new Null.fromJson(v)); - // }); - // } fLEXVALUESETNAME = json['FLEX_VALUE_SET_NAME']; fORMATTYPE = json['FORMAT_TYPE']; fORMATTYPEDSP = json['FORMAT_TYPE_DSP']; @@ -112,19 +105,6 @@ class GetCCPDFFStructureModel { nUMBERPRECISION = json['NUMBER_PRECISION']; nUMERICMODEENABLEDFLAG = json['NUMERIC_MODE_ENABLED_FLAG']; pARENTSEGMENTSDV = json['PARENT_SEGMENTS_DV']; - // if (json['PARENT_SEGMENTS_DV_Splited'] != null) { - // pARENTSEGMENTSDVSplited = []; - // json['PARENT_SEGMENTS_DV_Splited'].forEach((v) { - // pARENTSEGMENTSDVSplited!.add(new Null.fromJson(v)); - // }); - // } - // pARENTSEGMENTSVS = json['PARENT_SEGMENTS_VS']; - // if (json['PARENT_SEGMENTS_VS_SplitedVS'] != null) { - // pARENTSEGMENTSVSSplitedVS = []; - // json['PARENT_SEGMENTS_VS_SplitedVS'].forEach((v) { - // pARENTSEGMENTSVSSplitedVS!.add(new Null.fromJson(v)); - // }); - // } rEADONLY = json['READ_ONLY']; rEQUIREDFLAG = json['REQUIRED_FLAG']; sEGMENTNAME = json['SEGMENT_NAME']; diff --git a/lib/ui/screens/items_for_sale/item_for_sale_detail.dart b/lib/ui/screens/items_for_sale/item_for_sale_detail.dart index 01c60a6..c85f4e0 100644 --- a/lib/ui/screens/items_for_sale/item_for_sale_detail.dart +++ b/lib/ui/screens/items_for_sale/item_for_sale_detail.dart @@ -29,105 +29,109 @@ class _ItemForSaleDetailPageState extends State { appBar: AppBarWidget(context, // title: LocaleKeys.mowadhafhiRequest.tr(), title: "Items for sale", - showHomeButton: true), + showHomeButton: true,), body: SingleChildScrollView( - child: AspectRatio( - aspectRatio: 336 / 554, - child: Container( - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.circular(10), - boxShadow: [ - BoxShadow( - color: const Color(0xff000000).withOpacity(.05), - blurRadius: 26, - offset: const Offset(0, -3), + child: Column( + children: [ + AspectRatio( + aspectRatio: 336 / 554, + child: Container( + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.circular(10), + boxShadow: [ + BoxShadow( + color: const Color(0xff000000).withOpacity(.05), + blurRadius: 26, + offset: const Offset(0, -3), + ), + ], ), - ], - ), - // color: Colors.red, - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisSize: MainAxisSize.min, - children: [ - Container( - decoration: BoxDecoration( - boxShadow: [ - BoxShadow( - color: const Color(0xffEBEBEB).withOpacity(1.0), - blurRadius: 26, - offset: const Offset(0, -3), + // color: Colors.red, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.min, + children: [ + Container( + decoration: BoxDecoration( + boxShadow: [ + BoxShadow( + color: const Color(0xffEBEBEB).withOpacity(1.0), + blurRadius: 26, + offset: const Offset(0, -3), + ), + ], ), - ], - ), - child: Hero( - tag: "ItemImage" + getItemsForSaleList.itemSaleID.toString(), - transitionOnUserGestures: true, - child: AspectRatio( - aspectRatio: 148 / 127, - child: ClipRRect( - borderRadius: BorderRadius.circular(6), - child: Image.memory( - base64Decode(getItemsForSaleList.itemAttachments![0].content!), - fit: BoxFit.cover, - ), + child: Hero( + tag: "ItemImage" + getItemsForSaleList.itemSaleID.toString(), + transitionOnUserGestures: true, + child: AspectRatio( + aspectRatio: 148 / 127, + child: ClipRRect( + borderRadius: BorderRadius.circular(6), + child: Image.memory( + base64Decode(getItemsForSaleList.itemAttachments![0].content!), + fit: BoxFit.cover, + ), + ), + ).paddingAll(8), ), - ).paddingAll(8), - ), - ), - getItemsForSaleList.title!.toText20(isBold: true, color: const Color(0xff2B353E)).paddingOnly(left: 21, right: 21), - getItemsForSaleList.description!.toText12(maxLine: 5, color: const Color(0xff535353)).paddingOnly(left: 21, right: 21, bottom: 21), - getItemsForSaleList.status!.toText16(isBold: true, color: getItemsForSaleList.status == 'Approved' ? MyColors.greenColor : MyColors.yellowColor).paddingOnly(left: 21, right: 21), - "${getItemsForSaleList.quotePrice} ${getItemsForSaleList.currencyCode!}".toText20(isBold: true).paddingOnly(left: 21, right: 21, bottom: 15), - const Divider().paddingOnly(left: 21, right: 21), - Row( - children: [ - CircularAvatar( - height: 40, - width: 40, - ).paddingOnly(left: 21, top: 21), - Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisSize: MainAxisSize.min, + ), + getItemsForSaleList.title!.toText20(isBold: true, color: const Color(0xff2B353E)).paddingOnly(left: 21, right: 21), + getItemsForSaleList.description!.toText12(maxLine: 5, color: const Color(0xff535353)).paddingOnly(left: 21, right: 21, bottom: 21), + getItemsForSaleList.status!.toText16(isBold: true, color: getItemsForSaleList.status == 'Approved' ? MyColors.greenColor : MyColors.yellowColor).paddingOnly(left: 21, right: 21), + "${getItemsForSaleList.quotePrice} ${getItemsForSaleList.currencyCode!}".toText20(isBold: true).paddingOnly(left: 21, right: 21, bottom: 15), + const Divider().paddingOnly(left: 21, right: 21), + Row( children: [ - getItemsForSaleList.fullName!.toText14(isBold: true).paddingOnly(left: 7, right: 7), - "Posted on: ${DateUtil.formatDateToDate(DateTime.parse(getItemsForSaleList.created!), false)}".toText12().paddingOnly(left: 7, right: 7), + CircularAvatar( + height: 40, + width: 40, + ).paddingOnly(left: 21, top: 21), + Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.min, + children: [ + getItemsForSaleList.fullName!.toText14(isBold: true).paddingOnly(left: 7, right: 7), + "Posted on: ${DateUtil.formatDateToDate(DateTime.parse(getItemsForSaleList.created!), false)}".toText12().paddingOnly(left: 7, right: 7), + ], + ).paddingOnly(top: 18), ], - ).paddingOnly(top: 18), + ), ], ), - ], + ).paddingAll(21), + ), + Container( + decoration: const BoxDecoration( + color: MyColors.white, + boxShadow: [ + BoxShadow(color: MyColors.lightGreyEFColor, spreadRadius: 1), + ], + ), + child: Row( + children: [ + DefaultButton("Email", () async { + Uri emailLaunchUri = Uri( + scheme: 'mailto', + path: getItemsForSaleList.emailAddress, + ); + launchUrl(emailLaunchUri); + }, iconData: Icons.email_sharp, isTextExpanded: false) + .insideContainer + .expanded, + DefaultButton("Call", () async { + Uri callLaunchUri = Uri( + scheme: 'tel', + path: getItemsForSaleList.mobileNumber, + ); + launchUrl(callLaunchUri); + }, iconData: Icons.call_sharp, isTextExpanded: false) + .insideContainer + .expanded, + ], + ), ), - ).paddingAll(21), - ), - ), - bottomSheet: Container( - decoration: const BoxDecoration( - color: MyColors.white, - boxShadow: [ - BoxShadow(color: MyColors.lightGreyEFColor, spreadRadius: 1), - ], - ), - child: Row( - children: [ - DefaultButton("Email", () async { - Uri emailLaunchUri = Uri( - scheme: 'mailto', - path: getItemsForSaleList.emailAddress, - ); - launchUrl(emailLaunchUri); - }, iconData: Icons.email_sharp, isTextExpanded: false) - .insideContainer - .expanded, - DefaultButton("Call", () async { - Uri callLaunchUri = Uri( - scheme: 'tel', - path: getItemsForSaleList.mobileNumber, - ); - launchUrl(callLaunchUri); - }, iconData: Icons.call_sharp, isTextExpanded: false) - .insideContainer - .expanded, ], ), ), diff --git a/lib/ui/screens/my_requests/my_requests.dart b/lib/ui/screens/my_requests/my_requests.dart index 82bc38b..ebeff43 100644 --- a/lib/ui/screens/my_requests/my_requests.dart +++ b/lib/ui/screens/my_requests/my_requests.dart @@ -13,7 +13,6 @@ import 'package:mohem_flutter_app/extensions/int_extensions.dart'; import 'package:mohem_flutter_app/extensions/string_extensions.dart'; import 'package:mohem_flutter_app/extensions/widget_extensions.dart'; import 'package:mohem_flutter_app/generated/locale_keys.g.dart'; -import 'package:mohem_flutter_app/models/get_eit_dff_structure_list_model.dart'; import 'package:mohem_flutter_app/models/my_requests/get_ccp_output_model.dart'; import 'package:mohem_flutter_app/models/my_requests/get_ccp_transactions_model.dart'; import 'package:mohem_flutter_app/models/my_requests/get_concurrent_programs_model.dart'; @@ -45,127 +44,128 @@ class _MyRequestsState extends State { @override Widget build(BuildContext context) { return Scaffold( - backgroundColor: Colors.white, - appBar: AppBarWidget( - context, - title: "Concurrent Reports", + backgroundColor: Colors.white, + appBar: AppBarWidget( + context, + title: "Concurrent Reports", + ), + body: Container( + width: double.infinity, + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.circular(10), + boxShadow: [ + BoxShadow( + color: const Color(0xff000000).withOpacity(.05), + blurRadius: 26, + offset: const Offset(0, -3), + ), + ], ), - body: Container( - width: double.infinity, - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.circular(10), - boxShadow: [ - BoxShadow( - color: const Color(0xff000000).withOpacity(.05), - blurRadius: 26, - offset: const Offset(0, -3), - ), - ], - ), - child: Column( - children: [ - 12.height, - Container( - padding: const EdgeInsets.only(left: 12, right: 12, top: 10, bottom: 0), - margin: const EdgeInsets.only(left: 12, right: 12, top: 0, bottom: 0), - child: PopupMenuButton( - child: DynamicTextFieldWidget( - "Template Name", - selectedConcurrentProgramList?.uSERCONCURRENTPROGRAMNAME ?? "", - isEnable: false, - isPopup: true, - isInputTypeNum: true, - isReadOnly: false, - ).paddingOnly(bottom: 12), - itemBuilder: (_) => >[ - for (int i = 0; i < getConcurrentProgramsList!.length; i++) PopupMenuItem(child: Text(getConcurrentProgramsList![i].uSERCONCURRENTPROGRAMNAME!), value: i), - ], - onSelected: (int popupIndex) { - selectedConcurrentProgramList = getConcurrentProgramsList![popupIndex]; - getCCPTransactions(selectedConcurrentProgramList?.cONCURRENTPROGRAMNAME); - setState(() {}); - }), - ), - 12.height, - Expanded( - child: ListView.separated( - physics: const BouncingScrollPhysics(), - shrinkWrap: true, - itemBuilder: (BuildContext context, int index) { - return Container( - width: double.infinity, - padding: const EdgeInsets.only(left: 12, right: 12, top: 10, bottom: 12), - margin: const EdgeInsets.only(left: 12, right: 12, top: 10, bottom: 0), - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.circular(10), - boxShadow: [ - BoxShadow( - color: const Color(0xff000000).withOpacity(.05), - blurRadius: 26, - offset: const Offset(0, -3), - ), - ], - ), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Row( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - ("Request ID: " + getCCPTransactionsList[index].rEQUESTID.toString()).toText12(color: MyColors.grey57Color), - DateUtil.formatDateToDate(DateUtil.convertStringToDate(getCCPTransactionsList[index].rEQUESTDATE!), false).toText12(color: MyColors.grey70Color), - ], - ), - Container( - padding: const EdgeInsets.only(top: 10.0), - child: ("Phase: " + getCCPTransactionsList[index].cCPPHASE!).toText12(color: MyColors.grey57Color, isBold: true), - ), - Container( - padding: const EdgeInsets.only(top: 10.0), - child: "Program Name: ".toText12(color: MyColors.grey57Color, isBold: true), - ), - getCCPTransactionsList[index].cONCURRENTPROGRAMNAME!.toText12(color: MyColors.gradiantEndColor), - Container( - padding: const EdgeInsets.only(top: 10.0), - child: InkWell( - onTap: () { - getCCPOutput(getCCPTransactionsList[index].rEQUESTID.toString()); - }, - child: Row( - children: [ - "Output: ".toText12(color: MyColors.grey57Color), - 8.width, - "Open PDF".toText12(color: MyColors.grey57Color), - 6.width, - const Icon(Icons.launch, size: 16.0), - ], - ), + child: Column( + children: [ + 12.height, + Container( + padding: const EdgeInsets.only(left: 12, right: 12, top: 10, bottom: 0), + margin: const EdgeInsets.only(left: 12, right: 12, top: 0, bottom: 0), + child: PopupMenuButton( + child: DynamicTextFieldWidget( + "Template Name", + selectedConcurrentProgramList?.uSERCONCURRENTPROGRAMNAME ?? "", + isEnable: false, + isPopup: true, + isInputTypeNum: true, + isReadOnly: false, + ).paddingOnly(bottom: 12), + itemBuilder: (_) => >[ + for (int i = 0; i < getConcurrentProgramsList!.length; i++) PopupMenuItem(child: Text(getConcurrentProgramsList![i].uSERCONCURRENTPROGRAMNAME!), value: i), + ], + onSelected: (int popupIndex) { + selectedConcurrentProgramList = getConcurrentProgramsList![popupIndex]; + getCCPTransactions(selectedConcurrentProgramList?.cONCURRENTPROGRAMNAME); + setState(() {}); + }), + ), + 12.height, + Expanded( + child: ListView.separated( + physics: const BouncingScrollPhysics(), + shrinkWrap: true, + itemBuilder: (BuildContext context, int index) { + return Container( + width: double.infinity, + padding: const EdgeInsets.only(left: 12, right: 12, top: 10, bottom: 12), + margin: const EdgeInsets.only(left: 12, right: 12, top: 10, bottom: 0), + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.circular(10), + boxShadow: [ + BoxShadow( + color: const Color(0xff000000).withOpacity(.05), + blurRadius: 26, + offset: const Offset(0, -3), + ), + ], + ), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + ("Request ID: " + getCCPTransactionsList[index].rEQUESTID.toString()).toText12(color: MyColors.grey57Color), + DateUtil.formatDateToDate(DateUtil.convertStringToDate(getCCPTransactionsList[index].rEQUESTDATE!), false).toText12(color: MyColors.grey70Color), + ], + ), + Container( + padding: const EdgeInsets.only(top: 10.0), + child: ("Phase: " + getCCPTransactionsList[index].cCPPHASE!).toText12(color: MyColors.grey57Color, isBold: true), + ), + Container( + padding: const EdgeInsets.only(top: 10.0), + child: "Program Name: ".toText12(color: MyColors.grey57Color, isBold: true), + ), + getCCPTransactionsList[index].cONCURRENTPROGRAMNAME!.toText12(color: MyColors.gradiantEndColor), + Container( + padding: const EdgeInsets.only(top: 10.0), + child: InkWell( + onTap: () { + getCCPOutput(getCCPTransactionsList[index].rEQUESTID.toString()); + }, + child: Row( + children: [ + "Output: ".toText12(color: MyColors.grey57Color), + 8.width, + "Open PDF".toText12(color: MyColors.grey57Color), + 6.width, + const Icon(Icons.launch, size: 16.0), + ], ), ), - ], - ), - ); - }, - separatorBuilder: (BuildContext context, int index) => 12.height, - itemCount: getCCPTransactionsList.length ?? 0)), - 80.height - ], - ), + ), + ], + ), + ); + }, + separatorBuilder: (BuildContext context, int index) => 12.height, + itemCount: getCCPTransactionsList.length ?? 0)), + 80.height, + Container( + decoration: const BoxDecoration( + color: MyColors.white, + boxShadow: [ + BoxShadow(color: MyColors.lightGreyEFColor, spreadRadius: 3), + ], + ), + child: DefaultButton(LocaleKeys.createRequest.tr(), () async { + openNewRequest(); + }).insideContainer, + ) + ], ), - bottomSheet: Container( - decoration: const BoxDecoration( - color: MyColors.white, - boxShadow: [ - BoxShadow(color: MyColors.lightGreyEFColor, spreadRadius: 3), - ], - ), - child: DefaultButton(LocaleKeys.createRequest.tr(), () async { - openNewRequest(); - }).insideContainer, - )); + ), + ); } void openNewRequest() async { diff --git a/lib/ui/screens/my_requests/new_request.dart b/lib/ui/screens/my_requests/new_request.dart index 9577944..4cc2b20 100644 --- a/lib/ui/screens/my_requests/new_request.dart +++ b/lib/ui/screens/my_requests/new_request.dart @@ -78,21 +78,23 @@ class _NewRequestState extends State { itemBuilder: (cxt, int parentIndex) => parseDynamicFormatType(getCCPDFFStructureModelList[parentIndex], parentIndex), separatorBuilder: (cxt, index) => 0.height, itemCount: getCCPDFFStructureModelList.length)) - .expanded + .expanded, + Container( + decoration: const BoxDecoration( + color: MyColors.white, + boxShadow: [ + BoxShadow(color: MyColors.lightGreyEFColor, spreadRadius: 3), + ], + ), + child: DefaultButton(LocaleKeys.submit.tr(), () async { + // openNewRequest(); + }) + .insideContainer, + ) ], ), ), - bottomSheet: Container( - decoration: const BoxDecoration( - color: MyColors.white, - boxShadow: [ - BoxShadow(color: MyColors.lightGreyEFColor, spreadRadius: 3), - ], - ), - child: DefaultButton(LocaleKeys.submit.tr(), () async { - // openNewRequest(); - }).insideContainer, - ) + // bottomSheet: ); } @@ -412,8 +414,7 @@ class _NewRequestState extends State { ), ); } else { - DateTime? picked = - await showDatePicker(context: context, initialDate: selectedDate, initialEntryMode: DatePickerEntryMode.calendarOnly, firstDate: DateTime(2015, 8), lastDate: DateTime(2101)); + DateTime? picked = await showDatePicker(context: context, initialDate: selectedDate, initialEntryMode: DatePickerEntryMode.calendarOnly, firstDate: DateTime(2015, 8), lastDate: DateTime(2101)); if (picked != null && picked != selectedDate) { time = picked; } diff --git a/lib/ui/screens/offers_and_discounts/offers_and_discounts_details.dart b/lib/ui/screens/offers_and_discounts/offers_and_discounts_details.dart index e5b7f11..e1e216d 100644 --- a/lib/ui/screens/offers_and_discounts/offers_and_discounts_details.dart +++ b/lib/ui/screens/offers_and_discounts/offers_and_discounts_details.dart @@ -167,63 +167,46 @@ class _OffersAndDiscountsDetailsState extends State { } Widget getItemCard(OffersListModel getOffersList) { - return InkWell( - onTap: () { - this.getOffersList[0] = getOffersList; - _scrollToTop(); - setState(() {}); - }, - child: Container( - padding: const EdgeInsets.all(10.0), - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.circular(10), - boxShadow: [ - BoxShadow( - color: const Color(0xff000000).withOpacity(.05), - blurRadius: 26, - offset: const Offset(0, -3), - ), - ], - ), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisSize: MainAxisSize.min, - children: [ - Hero( - tag: "ItemImage" + getOffersList.rowID!, - transitionOnUserGestures: true, - child: AspectRatio( - aspectRatio: 148 / 127, - child: ClipRRect( - borderRadius: BorderRadius.circular(6), - child: Image.network( - getOffersList.bannerImage!, - fit: BoxFit.contain, - ), - ), + return Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.min, + children: [ + Hero( + tag: "ItemImage" + getOffersList.rowID!, + transitionOnUserGestures: true, + child: AspectRatio( + aspectRatio: 148 / 127, + child: ClipRRect( + borderRadius: BorderRadius.circular(6), + child: Image.network( + getOffersList.bannerImage!, + fit: BoxFit.contain, ), ), - 5.height, - getOffersList.title!.toText16(isBold: true, color: const Color(0xff2B353E), maxlines: 1), - // Html( - // data: AppState().isArabic(context) ? getOffersList.descriptionAR! : getOffersList.description ?? "", - // // onLinkTap: (String? url, RenderContext context, Map attributes, _) { - // // launchUrl(Uri.parse(url!)); - // // } - // ), - getOffersList.description!.toText12(maxLine: 2, color: const Color(0xff535353)), - 16.height, - getOffersList.discount!.toText14(isBold: true, maxlines: 1), - 10.height, - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [checkDate(getOffersList.endDate!), SvgPicture.asset("assets/images/arrow_next.svg").paddingOnly(bottom: 4)], - ), - ], + ), ), - ), - ); + 5.height, + getOffersList.title!.toText16(isBold: true, color: const Color(0xff2B353E), maxlines: 1), + // Html( + // data: AppState().isArabic(context) ? getOffersList.descriptionAR! : getOffersList.description ?? "", + // // onLinkTap: (String? url, RenderContext context, Map attributes, _) { + // // launchUrl(Uri.parse(url!)); + // // } + // ), + getOffersList.description!.toText12(maxLine: 2, color: const Color(0xff535353)), + 16.height, + getOffersList.discount!.toText14(isBold: true, maxlines: 1), + 8.height, + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [checkDate(getOffersList.endDate!), SvgPicture.asset("assets/images/arrow_next.svg").paddingOnly(bottom: 4)], + ), + ], + ).objectContainerView().onPress(() { + this.getOffersList[0] = getOffersList; + _scrollToTop(); + setState(() {}); + }); } void getOfferLocation() {}