update product detail

This commit is contained in:
Phuoc Nguyen
2025-11-19 16:07:54 +07:00
parent 841d77d886
commit 73ad2fc80c
5 changed files with 214 additions and 166 deletions

View File

@@ -228,64 +228,184 @@ class _SpecificationsTab extends StatelessWidget {
};
return Container(
margin: const EdgeInsets.all(20),
margin: const EdgeInsets.all(12),
decoration: BoxDecoration(
border: Border.all(color: const Color(0xFFe0e0e0)),
borderRadius: BorderRadius.circular(8),
),
child: Column(
children: specs.entries.map((entry) {
final isLast = entry == specs.entries.last;
return Container(
decoration: BoxDecoration(
border: isLast
? null
: const Border(
bottom: BorderSide(color: Color(0xFFe0e0e0)),
),
children: [
Container(
decoration: const BoxDecoration(
border: Border(
bottom: BorderSide(color: Color(0xFFe0e0e0)),
),
),
child: Row(
children: [
// Label
Expanded(
child: Container(
padding: const EdgeInsets.all(12),
color: const Color(0xFFF4F6F8),
child: Text(
entry.key,
style: const TextStyle(
fontSize: 14,
fontWeight: FontWeight.w500,
color: AppColors.grey900,
child: IntrinsicHeight(
child: Row(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
// Label
Expanded(
child: Container(
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 12),
color: const Color(0xFFF4F6F8),
child: Align(
alignment: Alignment.centerLeft,
child: Text(
"Thương hiệu",
style: const TextStyle(
fontSize: 14,
fontWeight: FontWeight.w500,
color: AppColors.grey900,
height: 1.5,
),
),
),
),
),
),
// Divider
Container(
width: 1,
height: 44,
color: const Color(0xFFe0e0e0),
),
// Divider
Container(
width: 1,
color: const Color(0xFFe0e0e0),
),
// Value
Expanded(
child: Container(
padding: const EdgeInsets.all(12),
child: Text(
entry.value.toString(),
style: const TextStyle(
fontSize: 14,
color: AppColors.grey900,
// Value
Expanded(
child: Container(
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 12),
child: Text(
'${product.brand}',
style: const TextStyle(
fontSize: 14,
color: AppColors.grey900,
height: 1.5,
),
softWrap: true,
),
),
),
),
],
],
),
),
);
}).toList(),
),
Container(
decoration: const BoxDecoration(
border: Border(
bottom: BorderSide(color: Color(0xFFe0e0e0)),
),
),
child: IntrinsicHeight(
child: Row(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
// Label
Expanded(
child: Container(
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 12),
color: const Color(0xFFF4F6F8),
child: const Align(
alignment: Alignment.centerLeft,
child: Text(
"Dòng sản phẩm",
style: TextStyle(
fontSize: 14,
fontWeight: FontWeight.w500,
color: AppColors.grey900,
height: 1.5,
),
),
),
),
),
// Divider
Container(
width: 1,
color: const Color(0xFFe0e0e0),
),
// Value
Expanded(
child: Container(
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 12),
child: Text(
'${product.itemGroupName}',
style: const TextStyle(
fontSize: 14,
color: AppColors.grey900,
height: 1.5,
),
softWrap: true,
),
),
),
],
),
),
),
...specs.entries.map((entry) {
final isLast = entry == specs.entries.last;
return Container(
decoration: BoxDecoration(
border: isLast
? null
: const Border(
bottom: BorderSide(color: Color(0xFFe0e0e0)),
),
),
child: IntrinsicHeight(
child: Row(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
// Label
Expanded(
child: Container(
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 12),
color: const Color(0xFFF4F6F8),
child: Align(
alignment: Alignment.centerLeft,
child: Text(
entry.key,
style: const TextStyle(
fontSize: 14,
fontWeight: FontWeight.w500,
color: AppColors.grey900,
height: 1.5,
),
),
),
),
),
// Divider
Container(
width: 1,
color: const Color(0xFFe0e0e0),
),
// Value
Expanded(
child: Container(
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 12),
child: Text(
'${entry.value}',
style: const TextStyle(
fontSize: 14,
color: AppColors.grey900,
height: 1.5,
),
softWrap: true,
),
),
),
],
),
),
);
}),
],
),
);
}