@@ -206,7 +206,7 @@ List<BoxShadow> wsBoxShadow({double blurRadius}) {
206206Widget wsCardProductItem (BuildContext context,
207207 {int index, Product product, onTap}) {
208208 return LayoutBuilder (
209- builder: (cxt,constraints) => InkWell (
209+ builder: (cxt, constraints) => InkWell (
210210 child: Container (
211211 margin: EdgeInsets .all (4 ),
212212 child: Column (
@@ -216,11 +216,16 @@ Widget wsCardProductItem(BuildContext context,
216216 borderRadius: BorderRadius .circular (3.0 ),
217217 child: CachedNetworkImage (
218218 imageUrl:
219- (product.images.length > 0 ? product.images.first.src : "" ),
220- placeholder: (context, url) => Center (child: CircularProgressIndicator ()),
219+ (product.images.length > 0 ? product.images.first.src : "" ),
220+ placeholder: (context, url) => Container (
221+ child: Center (
222+ child: CircularProgressIndicator (),
223+ ),
224+ height: constraints.maxHeight / 1.75 ,
225+ ),
221226 errorWidget: (context, url, error) => new Icon (Icons .error),
222- fit: BoxFit .cover ,
223- height: constraints.maxHeight / 1.8 ,
227+ fit: BoxFit .fitWidth ,
228+ height: constraints.maxHeight / 1.75 ,
224229 width: double .infinity,
225230 ),
226231 ),
@@ -239,10 +244,10 @@ Widget wsCardProductItem(BuildContext context,
239244 padding: const EdgeInsets .only (top: 1 ),
240245 child: Text (
241246 formatStringCurrency (total: product.price),
242- style: Theme .of (context).textTheme.bodyText1. copyWith (
243- fontWeight : FontWeight .w600,
244- fontSize : 16
245- ),
247+ style: Theme .of (context)
248+ .textTheme
249+ .bodyText1
250+ . copyWith (fontWeight : FontWeight .w600, fontSize : 16 ),
246251 textAlign: TextAlign .left,
247252 ),
248253 ),
@@ -251,27 +256,42 @@ Widget wsCardProductItem(BuildContext context,
251256 child: Container (
252257 child: (product.onSale && product.type != "variable"
253258 ? RichText (
254- textAlign: TextAlign .left,
255- text: TextSpan (
256- text: '' ,
257- style: Theme .of (context).textTheme.bodyText1,
258- children: < TextSpan > [
259- TextSpan (text: '${trans (context , "Was" )}: ' , style: Theme .of (context).textTheme.bodyText1.copyWith (
260- color: Colors .black54,
261- fontSize: 11
262- ),),
263- TextSpan (text: formatStringCurrency (total: product.regularPrice), style: Theme .of (context).textTheme.bodyText1.copyWith (
264- decoration: TextDecoration .lineThrough,
265- color: Colors .grey,
266- fontSize: 11
267- ),),
268- TextSpan (text: " | ${workoutSaleDiscount (salePrice : product .salePrice , priceBefore : product .regularPrice )}% ${trans (context , "off" )}" , style: Theme .of (context).textTheme.bodyText1.copyWith (
269- color: Colors .black87,
270- fontSize: 11
271- ),),
272- ],
273- ),
274- )
259+ textAlign: TextAlign .left,
260+ text: TextSpan (
261+ text: '' ,
262+ style: Theme .of (context).textTheme.bodyText1,
263+ children: < TextSpan > [
264+ TextSpan (
265+ text: '${trans (context , "Was" )}: ' ,
266+ style: Theme .of (context)
267+ .textTheme
268+ .bodyText1
269+ .copyWith (
270+ color: Colors .black54, fontSize: 11 ),
271+ ),
272+ TextSpan (
273+ text: formatStringCurrency (
274+ total: product.regularPrice),
275+ style: Theme .of (context)
276+ .textTheme
277+ .bodyText1
278+ .copyWith (
279+ decoration: TextDecoration .lineThrough,
280+ color: Colors .grey,
281+ fontSize: 11 ),
282+ ),
283+ TextSpan (
284+ text:
285+ " | ${workoutSaleDiscount (salePrice : product .salePrice , priceBefore : product .regularPrice )}% ${trans (context , "off" )}" ,
286+ style: Theme .of (context)
287+ .textTheme
288+ .bodyText1
289+ .copyWith (
290+ color: Colors .black87, fontSize: 11 ),
291+ ),
292+ ],
293+ ),
294+ )
275295 : null ),
276296 width: double .infinity,
277297 ),
0 commit comments