diff --git a/lib/core/constants/colors.dart b/lib/core/constants/colors.dart index 41c5465..9577a9b 100644 --- a/lib/core/constants/colors.dart +++ b/lib/core/constants/colors.dart @@ -2,7 +2,8 @@ import 'package:flutter/material.dart'; class AppColors { /// primary = #3949AB - static const Color primary = Color(0xff6466f1); + static const Color primary = Color(0xff36175e); + static const Color secondary = Color(0xfff1eaf9); /// grey = #B7B7B7 static const Color grey = Color(0xffB7B7B7); diff --git a/lib/presentation/home/widgets/product_card.dart b/lib/presentation/home/widgets/product_card.dart index 78655e9..3e80058 100644 --- a/lib/presentation/home/widgets/product_card.dart +++ b/lib/presentation/home/widgets/product_card.dart @@ -50,21 +50,25 @@ class ProductCard extends StatelessWidget { ), child: ClipRRect( borderRadius: BorderRadius.all(Radius.circular(40.0)), - child: - // Icon( - // Icons.fastfood, - // size: 40, - // color: AppColors.primary, - // ), - CachedNetworkImage( + child: CachedNetworkImage( imageUrl: data.image!.contains('http') ? data.image! : '${Variables.baseUrl}/${data.image}', + fit: BoxFit.cover, width: 60, height: 60, - fit: BoxFit.cover, - errorWidget: (context, url, error) => - const Icon(Icons.error), + errorWidget: (context, url, error) => Container( + width: 60, + height: 60, + decoration: BoxDecoration( + shape: BoxShape.circle, + color: AppColors.disabled.withOpacity(0.4), + ), + child: const Icon( + Icons.image_not_supported, + color: AppColors.grey, + ), + ), ), ), ),