update cart
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
/// Payment Method Section Widget
|
||||
///
|
||||
/// Payment method selection (Bank Transfer or COD).
|
||||
/// Payment method selection with two options:
|
||||
/// 1. Full payment via bank transfer
|
||||
/// 2. Partial payment (>=20%, 30 day terms)
|
||||
library;
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
@@ -10,7 +12,7 @@ import 'package:worker/core/theme/colors.dart';
|
||||
|
||||
/// Payment Method Section
|
||||
///
|
||||
/// Allows user to select payment method between bank transfer and COD.
|
||||
/// Two payment options matching checkout.html design.
|
||||
class PaymentMethodSection extends HookWidget {
|
||||
final ValueNotifier<String> paymentMethod;
|
||||
|
||||
@@ -47,27 +49,34 @@ class PaymentMethodSection extends HookWidget {
|
||||
|
||||
const SizedBox(height: AppSpacing.md),
|
||||
|
||||
// Bank Transfer Option
|
||||
// Full Payment Option
|
||||
InkWell(
|
||||
onTap: () => paymentMethod.value = 'bank_transfer',
|
||||
onTap: () => paymentMethod.value = 'full_payment',
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 8),
|
||||
child: Row(
|
||||
children: [
|
||||
Radio<String>(
|
||||
value: 'bank_transfer',
|
||||
value: 'full_payment',
|
||||
groupValue: paymentMethod.value,
|
||||
onChanged: (value) {
|
||||
paymentMethod.value = value!;
|
||||
},
|
||||
activeColor: AppColors.primaryBlue,
|
||||
),
|
||||
const SizedBox(width: 12),
|
||||
const Icon(
|
||||
Icons.account_balance_outlined,
|
||||
color: AppColors.grey500,
|
||||
size: 24,
|
||||
),
|
||||
const SizedBox(width: 12),
|
||||
const Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
'Chuyển khoản ngân hàng',
|
||||
'Thanh toán hoàn toàn',
|
||||
style: TextStyle(
|
||||
fontSize: 15,
|
||||
fontWeight: FontWeight.w500,
|
||||
@@ -75,7 +84,7 @@ class PaymentMethodSection extends HookWidget {
|
||||
),
|
||||
SizedBox(height: 4),
|
||||
Text(
|
||||
'Thanh toán qua chuyển khoản',
|
||||
'Thanh toán qua tài khoản ngân hàng',
|
||||
style: TextStyle(
|
||||
fontSize: 13,
|
||||
color: AppColors.grey500,
|
||||
@@ -91,27 +100,34 @@ class PaymentMethodSection extends HookWidget {
|
||||
|
||||
const Divider(height: 1),
|
||||
|
||||
// COD Option
|
||||
// Partial Payment Option
|
||||
InkWell(
|
||||
onTap: () => paymentMethod.value = 'cod',
|
||||
onTap: () => paymentMethod.value = 'partial_payment',
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 8),
|
||||
child: Row(
|
||||
children: [
|
||||
Radio<String>(
|
||||
value: 'cod',
|
||||
value: 'partial_payment',
|
||||
groupValue: paymentMethod.value,
|
||||
onChanged: (value) {
|
||||
paymentMethod.value = value!;
|
||||
},
|
||||
activeColor: AppColors.primaryBlue,
|
||||
),
|
||||
const SizedBox(width: 12),
|
||||
const Icon(
|
||||
Icons.payments_outlined,
|
||||
color: AppColors.grey500,
|
||||
size: 24,
|
||||
),
|
||||
const SizedBox(width: 12),
|
||||
const Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
'Thanh toán khi nhận hàng (COD)',
|
||||
'Thanh toán một phần',
|
||||
style: TextStyle(
|
||||
fontSize: 15,
|
||||
fontWeight: FontWeight.w500,
|
||||
@@ -119,7 +135,7 @@ class PaymentMethodSection extends HookWidget {
|
||||
),
|
||||
SizedBox(height: 4),
|
||||
Text(
|
||||
'Thanh toán bằng tiền mặt khi nhận hàng',
|
||||
'Trả trước(≥20%), còn lại thanh toán trong vòng 30 ngày',
|
||||
style: TextStyle(
|
||||
fontSize: 13,
|
||||
color: AppColors.grey500,
|
||||
|
||||
Reference in New Issue
Block a user