feat: syn product
This commit is contained in:
@@ -28,9 +28,9 @@ class DetailProductDialog extends StatelessWidget {
|
||||
ClipRRect(
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
child: CachedNetworkImage(
|
||||
imageUrl: product.image!.contains('http')
|
||||
? product.image!
|
||||
: '${Variables.baseUrl}/${product.image}',
|
||||
imageUrl: product.name!.contains('http')
|
||||
? product.name!
|
||||
: '${Variables.baseUrl}/${product.name}',
|
||||
fit: BoxFit.cover,
|
||||
width: 120,
|
||||
height: 120,
|
||||
@@ -88,20 +88,20 @@ class DetailProductDialog extends StatelessWidget {
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
_buildItem(
|
||||
product.category?.name ?? "-",
|
||||
"-",
|
||||
"Kategori",
|
||||
),
|
||||
// _buildItem(
|
||||
// "${product.stock}",
|
||||
// "Stok",
|
||||
// valueColor: product.stock! < 50
|
||||
// ? AppColors.red
|
||||
// : product.stock! < 100
|
||||
// ? Colors.yellow
|
||||
// : AppColors.green,
|
||||
// ),
|
||||
_buildItem(
|
||||
"${product.stock}",
|
||||
"Stok",
|
||||
valueColor: product.stock! < 50
|
||||
? AppColors.red
|
||||
: product.stock! < 100
|
||||
? Colors.yellow
|
||||
: AppColors.green,
|
||||
),
|
||||
_buildItem(
|
||||
(product.price ?? "0").currencyFormatRpV2,
|
||||
(product.price ?? 0).toString().currencyFormatRpV2,
|
||||
"Harga",
|
||||
valueColor: AppColors.primary,
|
||||
),
|
||||
@@ -142,11 +142,11 @@ class DetailProductDialog extends StatelessWidget {
|
||||
return Container(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 4),
|
||||
decoration: BoxDecoration(
|
||||
color: product.status == 1 ? AppColors.green : AppColors.red,
|
||||
color: product.isActive == true ? AppColors.green : AppColors.red,
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
),
|
||||
child: Text(
|
||||
product.status == 1 ? 'Aktif' : 'Tidak Aktif',
|
||||
product.isActive == true ? 'Aktif' : 'Tidak Aktif',
|
||||
style: const TextStyle(
|
||||
color: Colors.white, fontSize: 12, fontWeight: FontWeight.w700),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user