2026-01-16 15:53:06 +07:00

69 lines
2.1 KiB
Dart

import 'package:flutter/material.dart';
import '../../../../common/extension/extension.dart';
import '../../../../common/theme/theme.dart';
import '../../../../sample/product_sample_data.dart';
import '../../../components/button/button.dart';
import '../../../components/image/image.dart';
class CheckoutItem extends StatelessWidget {
final Product product;
const CheckoutItem({super.key, required this.product});
@override
Widget build(BuildContext context) {
return Container(
margin: EdgeInsets.only(bottom: 16),
decoration: BoxDecoration(),
child: Column(
children: [
Row(
children: [
AppNetworkImage(url: product.imageUrl, width: 60, height: 60),
SizedBox(width: 12),
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
product.name,
style: AppStyle.md.copyWith(fontWeight: FontWeight.bold),
),
SizedBox(height: 4),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
"1x ${product.price.currencyFormatRp}",
style: AppStyle.md,
),
Text("27000".currencyFormatRp, style: AppStyle.md),
],
),
],
),
),
],
),
SizedBox(height: 8),
Row(
children: [
Expanded(
child: Text(
'Catatan',
style: AppStyle.md.copyWith(
color: AppColor.textSecondary,
fontWeight: FontWeight.w600,
),
),
),
SizedBox(width: 12),
QtyButton(),
],
),
],
),
);
}
}