feat: update home page
This commit is contained in:
@@ -102,79 +102,79 @@ class MenuProductItem extends StatelessWidget {
|
||||
child: GestureDetector(
|
||||
onTap: () {
|
||||
showDialog(
|
||||
context: context,
|
||||
// backgroundColor: AppColors.white,
|
||||
builder: (context) {
|
||||
//container for product detail
|
||||
return AlertDialog(
|
||||
contentPadding: const EdgeInsets.all(16.0),
|
||||
content: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Row(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
data.name!,
|
||||
style: const TextStyle(
|
||||
fontSize: 20,
|
||||
),
|
||||
context: context,
|
||||
builder: (context) {
|
||||
//container for product detail
|
||||
return AlertDialog(
|
||||
backgroundColor: AppColors.white,
|
||||
contentPadding: const EdgeInsets.all(16.0),
|
||||
content: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Row(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
data.name!,
|
||||
style: const TextStyle(
|
||||
fontSize: 20,
|
||||
),
|
||||
IconButton(
|
||||
onPressed: () {
|
||||
Navigator.pop(context);
|
||||
},
|
||||
icon: const Icon(Icons.close),
|
||||
),
|
||||
],
|
||||
),
|
||||
const SpaceHeight(10.0),
|
||||
ClipRRect(
|
||||
borderRadius: const BorderRadius.all(
|
||||
Radius.circular(10.0)),
|
||||
child: CachedNetworkImage(
|
||||
imageUrl:
|
||||
'${Variables.baseUrl}${data.image}',
|
||||
placeholder: (context, url) => const Center(
|
||||
child: CircularProgressIndicator()),
|
||||
errorWidget: (context, url, error) =>
|
||||
const Icon(
|
||||
Icons.food_bank_outlined,
|
||||
size: 80,
|
||||
),
|
||||
width: 80,
|
||||
),
|
||||
),
|
||||
const SpaceHeight(10.0),
|
||||
Text(
|
||||
data.category?.name ?? '-',
|
||||
style: const TextStyle(
|
||||
fontSize: 12,
|
||||
color: Colors.grey,
|
||||
IconButton(
|
||||
onPressed: () {
|
||||
Navigator.pop(context);
|
||||
},
|
||||
icon: const Icon(Icons.close),
|
||||
),
|
||||
),
|
||||
const SpaceHeight(10.0),
|
||||
Text(
|
||||
data.price.toString(),
|
||||
style: const TextStyle(
|
||||
fontSize: 12,
|
||||
color: Colors.grey,
|
||||
],
|
||||
),
|
||||
const SpaceHeight(10.0),
|
||||
ClipRRect(
|
||||
borderRadius: const BorderRadius.all(
|
||||
Radius.circular(10.0)),
|
||||
child: CachedNetworkImage(
|
||||
imageUrl: '${Variables.baseUrl}${data.image}',
|
||||
placeholder: (context, url) => const Center(
|
||||
child: CircularProgressIndicator()),
|
||||
errorWidget: (context, url, error) =>
|
||||
const Icon(
|
||||
Icons.food_bank_outlined,
|
||||
size: 80,
|
||||
),
|
||||
width: 80,
|
||||
),
|
||||
const SpaceHeight(10.0),
|
||||
Text(
|
||||
data.stock.toString(),
|
||||
style: const TextStyle(
|
||||
fontSize: 12,
|
||||
color: Colors.grey,
|
||||
),
|
||||
),
|
||||
const SpaceHeight(10.0),
|
||||
Text(
|
||||
data.category?.name ?? '-',
|
||||
style: const TextStyle(
|
||||
fontSize: 12,
|
||||
color: Colors.grey,
|
||||
),
|
||||
const SpaceHeight(10.0),
|
||||
],
|
||||
),
|
||||
);
|
||||
});
|
||||
),
|
||||
const SpaceHeight(10.0),
|
||||
Text(
|
||||
data.price.toString(),
|
||||
style: const TextStyle(
|
||||
fontSize: 12,
|
||||
color: Colors.grey,
|
||||
),
|
||||
),
|
||||
const SpaceHeight(10.0),
|
||||
Text(
|
||||
data.stock.toString(),
|
||||
style: const TextStyle(
|
||||
fontSize: 12,
|
||||
color: Colors.grey,
|
||||
),
|
||||
),
|
||||
const SpaceHeight(10.0),
|
||||
],
|
||||
),
|
||||
);
|
||||
},
|
||||
);
|
||||
},
|
||||
child: Container(
|
||||
padding: const EdgeInsets.symmetric(vertical: 4),
|
||||
|
||||
Reference in New Issue
Block a user