|
|
|
@ -61,13 +61,7 @@ class _OffersAndDiscountsDetailsState extends State<OffersAndDiscountsDetails> {
|
|
|
|
// transitionOnUserGestures: true,
|
|
|
|
// transitionOnUserGestures: true,
|
|
|
|
child: RepaintBoundary(
|
|
|
|
child: RepaintBoundary(
|
|
|
|
key: _globalKey,
|
|
|
|
key: _globalKey,
|
|
|
|
child: ClipRRect(
|
|
|
|
child: ClipRRect(borderRadius: BorderRadius.circular(6), child: Image.network(getOffersList[0].bannerImage ?? "", fit: BoxFit.contain)).paddingAll(12),
|
|
|
|
borderRadius: BorderRadius.circular(6),
|
|
|
|
|
|
|
|
child: Image.network(
|
|
|
|
|
|
|
|
getOffersList[0].bannerImage ?? "",
|
|
|
|
|
|
|
|
fit: BoxFit.contain,
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
).paddingAll(12),
|
|
|
|
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
8.height,
|
|
|
|
8.height,
|
|
|
|
@ -77,7 +71,6 @@ class _OffersAndDiscountsDetailsState extends State<OffersAndDiscountsDetails> {
|
|
|
|
Html(
|
|
|
|
Html(
|
|
|
|
data: AppState().isArabic(context) ? getOffersList[0].descriptionAr! : getOffersList[0].descriptionEn ?? "",
|
|
|
|
data: AppState().isArabic(context) ? getOffersList[0].descriptionAr! : getOffersList[0].descriptionEn ?? "",
|
|
|
|
onLinkTap: (String? url, Map<String, String> attributes, _) {
|
|
|
|
onLinkTap: (String? url, Map<String, String> attributes, _) {
|
|
|
|
|
|
|
|
|
|
|
|
launchUrl(Uri.parse(url!));
|
|
|
|
launchUrl(Uri.parse(url!));
|
|
|
|
},
|
|
|
|
},
|
|
|
|
),
|
|
|
|
),
|
|
|
|
@ -88,19 +81,20 @@ class _OffersAndDiscountsDetailsState extends State<OffersAndDiscountsDetails> {
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
getOffersList[0].discountDescription!.toText16(isBold: true),
|
|
|
|
getOffersList[0].discountDescription!.toText16(isBold: true),
|
|
|
|
InkWell(
|
|
|
|
InkWell(
|
|
|
|
onTap: () {
|
|
|
|
onTap: () {
|
|
|
|
_shareOfferAsImage();
|
|
|
|
_shareOfferAsImage();
|
|
|
|
},
|
|
|
|
},
|
|
|
|
child: const Icon(Icons.share, color: MyColors.darkIconColor).paddingOnly(bottom: 4))
|
|
|
|
child: const Icon(Icons.share, color: MyColors.darkIconColor).paddingOnly(bottom: 4),
|
|
|
|
|
|
|
|
),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
).paddingOnly(left: 8, right: 8),
|
|
|
|
).paddingOnly(left: 8, right: 8),
|
|
|
|
getOffersList[0].isHasLocation == "true"
|
|
|
|
getOffersList[0].isHasLocation == "true"
|
|
|
|
? InkWell(
|
|
|
|
? InkWell(
|
|
|
|
onTap: () {},
|
|
|
|
onTap: () {},
|
|
|
|
child: Row(
|
|
|
|
child: Row(
|
|
|
|
children: [const Icon(Icons.map_sharp, color: MyColors.darkIconColor).paddingOnly(bottom: 4), "Offer Location".toText16(isUnderLine: true).paddingOnly(left: 8)],
|
|
|
|
children: [const Icon(Icons.map_sharp, color: MyColors.darkIconColor).paddingOnly(bottom: 4), "Offer Location".toText16(isUnderLine: true).paddingOnly(left: 8)],
|
|
|
|
).paddingOnly(left: 8, right: 8, top: 8),
|
|
|
|
).paddingOnly(left: 8, right: 8, top: 8),
|
|
|
|
)
|
|
|
|
)
|
|
|
|
: 12.height,
|
|
|
|
: 12.height,
|
|
|
|
],
|
|
|
|
],
|
|
|
|
).objectContainerView().paddingOnly(left: 21, right: 21, top: 21),
|
|
|
|
).objectContainerView().paddingOnly(left: 21, right: 21, top: 21),
|
|
|
|
@ -135,11 +129,7 @@ class _OffersAndDiscountsDetailsState extends State<OffersAndDiscountsDetails> {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void _scrollToTop() {
|
|
|
|
void _scrollToTop() {
|
|
|
|
_scrollController.animateTo(
|
|
|
|
_scrollController.animateTo(0, duration: const Duration(milliseconds: 500), curve: Curves.linear);
|
|
|
|
0,
|
|
|
|
|
|
|
|
duration: const Duration(milliseconds: 500),
|
|
|
|
|
|
|
|
curve: Curves.linear,
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
List<Widget> getItemsForSaleWidgets() {
|
|
|
|
List<Widget> getItemsForSaleWidgets() {
|
|
|
|
@ -158,16 +148,7 @@ class _OffersAndDiscountsDetailsState extends State<OffersAndDiscountsDetails> {
|
|
|
|
Hero(
|
|
|
|
Hero(
|
|
|
|
tag: "ItemImage" + getOffersList.offersDiscountId.toString(),
|
|
|
|
tag: "ItemImage" + getOffersList.offersDiscountId.toString(),
|
|
|
|
transitionOnUserGestures: true,
|
|
|
|
transitionOnUserGestures: true,
|
|
|
|
child: AspectRatio(
|
|
|
|
child: AspectRatio(aspectRatio: 148 / 127, child: ClipRRect(borderRadius: BorderRadius.circular(6), child: Image.network(getOffersList.bannerImage ?? "", fit: BoxFit.contain))),
|
|
|
|
aspectRatio: 148 / 127,
|
|
|
|
|
|
|
|
child: ClipRRect(
|
|
|
|
|
|
|
|
borderRadius: BorderRadius.circular(6),
|
|
|
|
|
|
|
|
child: Image.network(
|
|
|
|
|
|
|
|
getOffersList.bannerImage ?? "",
|
|
|
|
|
|
|
|
fit: BoxFit.contain,
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
),
|
|
|
|
5.height,
|
|
|
|
5.height,
|
|
|
|
getOffersList.titleEn!.toText16(isBold: true, color: const Color(0xff2B353E), maxlines: 1),
|
|
|
|
getOffersList.titleEn!.toText16(isBold: true, color: const Color(0xff2B353E), maxlines: 1),
|
|
|
|
@ -181,10 +162,7 @@ class _OffersAndDiscountsDetailsState extends State<OffersAndDiscountsDetails> {
|
|
|
|
// 16.height,
|
|
|
|
// 16.height,
|
|
|
|
getOffersList.discountDescription!.toText14(isBold: true, maxlines: 1),
|
|
|
|
getOffersList.discountDescription!.toText14(isBold: true, maxlines: 1),
|
|
|
|
8.height,
|
|
|
|
8.height,
|
|
|
|
Row(
|
|
|
|
Row(mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [checkDate(getOffersList.endDate!), SvgPicture.asset("assets/images/arrow_next.svg").paddingOnly(bottom: 4)]),
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
|
|
|
children: [checkDate(getOffersList.endDate!), SvgPicture.asset("assets/images/arrow_next.svg").paddingOnly(bottom: 4)],
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
],
|
|
|
|
],
|
|
|
|
).objectContainerView().onPress(() {
|
|
|
|
).objectContainerView().onPress(() {
|
|
|
|
this.getOffersList[0] = getOffersList;
|
|
|
|
this.getOffersList[0] = getOffersList;
|
|
|
|
|