From 66edbf3f38b02e7112221164ad90a00b285f7fc1 Mon Sep 17 00:00:00 2001 From: Frederik Benoist Date: Sun, 26 Feb 2023 19:02:54 +0100 Subject: [PATCH] Ajout photo dans product_detail --- .../product_detail/product_detail.dart | 38 ++----------------- 1 file changed, 4 insertions(+), 34 deletions(-) diff --git a/lib/ui/general/product_detail/product_detail.dart b/lib/ui/general/product_detail/product_detail.dart index 5b6ddc5..5a353a1 100644 --- a/lib/ui/general/product_detail/product_detail.dart +++ b/lib/ui/general/product_detail/product_detail.dart @@ -330,7 +330,7 @@ class _ProductDetailPageState extends State { mainAxisAlignment: MainAxisAlignment.spaceBetween, crossAxisAlignment: CrossAxisAlignment.center, children: [ - Text('\$' + _globalFunction.removeDecimalZeroFormat(widget.price), + Text(widget.photo.toString() + ' photo(s)', style: GlobalStyle.detailProductPrice), GestureDetector( onTap: () { @@ -338,11 +338,11 @@ class _ProductDetailPageState extends State { if (_isLove == true) { _isLove = false; Fluttertoast.showToast( - msg: 'Item has been deleted from your wishlist', + msg: "La photo n'est plus taguée comme favorite", toastLength: Toast.LENGTH_LONG); } else { Fluttertoast.showToast( - msg: 'Item has been added to your wishlist', + msg: "La photo est taguée comme favorite", toastLength: Toast.LENGTH_LONG); _isLove = true; } @@ -363,37 +363,7 @@ class _ProductDetailPageState extends State { IntrinsicHeight( child: Row( children: [ - GestureDetector( - behavior: HitTestBehavior.translucent, - onTap: () { - Navigator.push( - context, - MaterialPageRoute( - builder: (context) => ProductReviewPage())); - }, - child: Row( - children: [ - Icon(Icons.star, color: Colors.yellow[700], size: 18), - SizedBox( - width: 3, - ), - Text(widget.rating.toString(), - style: TextStyle( - fontWeight: FontWeight.bold, fontSize: 14)), - SizedBox( - width: 3, - ), - Text('(' + widget.review.toString() + ')', - style: TextStyle(fontSize: 13, color: BLACK_GREY)), - ], - ), - ), - VerticalDivider( - width: 30, - thickness: 1, - color: Colors.grey[300], - ), - Text(widget.sale.toString() + ' Sale', + Text(widget.date, style: TextStyle(fontSize: 13, color: BLACK_GREY)), VerticalDivider( width: 30,