feat: color and image empty
This commit is contained in:
parent
8767f02109
commit
74460c921b
@ -2,7 +2,8 @@ import 'package:flutter/material.dart';
|
|||||||
|
|
||||||
class AppColors {
|
class AppColors {
|
||||||
/// primary = #3949AB
|
/// primary = #3949AB
|
||||||
static const Color primary = Color(0xff6466f1);
|
static const Color primary = Color(0xff36175e);
|
||||||
|
static const Color secondary = Color(0xfff1eaf9);
|
||||||
|
|
||||||
/// grey = #B7B7B7
|
/// grey = #B7B7B7
|
||||||
static const Color grey = Color(0xffB7B7B7);
|
static const Color grey = Color(0xffB7B7B7);
|
||||||
|
|||||||
@ -50,21 +50,25 @@ class ProductCard extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
child: ClipRRect(
|
child: ClipRRect(
|
||||||
borderRadius: BorderRadius.all(Radius.circular(40.0)),
|
borderRadius: BorderRadius.all(Radius.circular(40.0)),
|
||||||
child:
|
child: CachedNetworkImage(
|
||||||
// Icon(
|
|
||||||
// Icons.fastfood,
|
|
||||||
// size: 40,
|
|
||||||
// color: AppColors.primary,
|
|
||||||
// ),
|
|
||||||
CachedNetworkImage(
|
|
||||||
imageUrl: data.image!.contains('http')
|
imageUrl: data.image!.contains('http')
|
||||||
? data.image!
|
? data.image!
|
||||||
: '${Variables.baseUrl}/${data.image}',
|
: '${Variables.baseUrl}/${data.image}',
|
||||||
|
fit: BoxFit.cover,
|
||||||
width: 60,
|
width: 60,
|
||||||
height: 60,
|
height: 60,
|
||||||
fit: BoxFit.cover,
|
errorWidget: (context, url, error) => Container(
|
||||||
errorWidget: (context, url, error) =>
|
width: 60,
|
||||||
const Icon(Icons.error),
|
height: 60,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
shape: BoxShape.circle,
|
||||||
|
color: AppColors.disabled.withOpacity(0.4),
|
||||||
|
),
|
||||||
|
child: const Icon(
|
||||||
|
Icons.image_not_supported,
|
||||||
|
color: AppColors.grey,
|
||||||
|
),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user