add auth, format
This commit is contained in:
@@ -30,104 +30,66 @@ class StatusBadge extends StatelessWidget {
|
||||
});
|
||||
|
||||
/// Order status badges
|
||||
factory StatusBadge.orderPending() => const StatusBadge(
|
||||
label: 'Chờ xử lý',
|
||||
color: AppColors.info,
|
||||
);
|
||||
factory StatusBadge.orderPending() =>
|
||||
const StatusBadge(label: 'Chờ xử lý', color: AppColors.info);
|
||||
|
||||
factory StatusBadge.orderProcessing() => const StatusBadge(
|
||||
label: 'Đang xử lý',
|
||||
color: AppColors.warning,
|
||||
);
|
||||
factory StatusBadge.orderProcessing() =>
|
||||
const StatusBadge(label: 'Đang xử lý', color: AppColors.warning);
|
||||
|
||||
factory StatusBadge.orderShipping() => const StatusBadge(
|
||||
label: 'Đang giao',
|
||||
color: AppColors.lightBlue,
|
||||
);
|
||||
factory StatusBadge.orderShipping() =>
|
||||
const StatusBadge(label: 'Đang giao', color: AppColors.lightBlue);
|
||||
|
||||
factory StatusBadge.orderCompleted() => const StatusBadge(
|
||||
label: 'Hoàn thành',
|
||||
color: AppColors.success,
|
||||
);
|
||||
factory StatusBadge.orderCompleted() =>
|
||||
const StatusBadge(label: 'Hoàn thành', color: AppColors.success);
|
||||
|
||||
factory StatusBadge.orderCancelled() => const StatusBadge(
|
||||
label: 'Đã hủy',
|
||||
color: AppColors.danger,
|
||||
);
|
||||
factory StatusBadge.orderCancelled() =>
|
||||
const StatusBadge(label: 'Đã hủy', color: AppColors.danger);
|
||||
|
||||
/// Payment status badges
|
||||
factory StatusBadge.paymentPending() => const StatusBadge(
|
||||
label: 'Chờ thanh toán',
|
||||
color: AppColors.warning,
|
||||
);
|
||||
factory StatusBadge.paymentPending() =>
|
||||
const StatusBadge(label: 'Chờ thanh toán', color: AppColors.warning);
|
||||
|
||||
factory StatusBadge.paymentProcessing() => const StatusBadge(
|
||||
label: 'Đang xử lý',
|
||||
color: AppColors.info,
|
||||
);
|
||||
factory StatusBadge.paymentProcessing() =>
|
||||
const StatusBadge(label: 'Đang xử lý', color: AppColors.info);
|
||||
|
||||
factory StatusBadge.paymentCompleted() => const StatusBadge(
|
||||
label: 'Đã thanh toán',
|
||||
color: AppColors.success,
|
||||
);
|
||||
factory StatusBadge.paymentCompleted() =>
|
||||
const StatusBadge(label: 'Đã thanh toán', color: AppColors.success);
|
||||
|
||||
factory StatusBadge.paymentFailed() => const StatusBadge(
|
||||
label: 'Thất bại',
|
||||
color: AppColors.danger,
|
||||
);
|
||||
factory StatusBadge.paymentFailed() =>
|
||||
const StatusBadge(label: 'Thất bại', color: AppColors.danger);
|
||||
|
||||
/// Project status badges
|
||||
factory StatusBadge.projectPlanning() => const StatusBadge(
|
||||
label: 'Lập kế hoạch',
|
||||
color: AppColors.info,
|
||||
);
|
||||
factory StatusBadge.projectPlanning() =>
|
||||
const StatusBadge(label: 'Lập kế hoạch', color: AppColors.info);
|
||||
|
||||
factory StatusBadge.projectInProgress() => const StatusBadge(
|
||||
label: 'Đang thực hiện',
|
||||
color: AppColors.warning,
|
||||
);
|
||||
factory StatusBadge.projectInProgress() =>
|
||||
const StatusBadge(label: 'Đang thực hiện', color: AppColors.warning);
|
||||
|
||||
factory StatusBadge.projectCompleted() => const StatusBadge(
|
||||
label: 'Hoàn thành',
|
||||
color: AppColors.success,
|
||||
);
|
||||
factory StatusBadge.projectCompleted() =>
|
||||
const StatusBadge(label: 'Hoàn thành', color: AppColors.success);
|
||||
|
||||
factory StatusBadge.projectOnHold() => const StatusBadge(
|
||||
label: 'Tạm dừng',
|
||||
color: AppColors.grey500,
|
||||
);
|
||||
factory StatusBadge.projectOnHold() =>
|
||||
const StatusBadge(label: 'Tạm dừng', color: AppColors.grey500);
|
||||
|
||||
/// Gift status badges
|
||||
factory StatusBadge.giftActive() => const StatusBadge(
|
||||
label: 'Còn hạn',
|
||||
color: AppColors.success,
|
||||
);
|
||||
factory StatusBadge.giftActive() =>
|
||||
const StatusBadge(label: 'Còn hạn', color: AppColors.success);
|
||||
|
||||
factory StatusBadge.giftUsed() => const StatusBadge(
|
||||
label: 'Đã sử dụng',
|
||||
color: AppColors.grey500,
|
||||
);
|
||||
factory StatusBadge.giftUsed() =>
|
||||
const StatusBadge(label: 'Đã sử dụng', color: AppColors.grey500);
|
||||
|
||||
factory StatusBadge.giftExpired() => const StatusBadge(
|
||||
label: 'Hết hạn',
|
||||
color: AppColors.danger,
|
||||
);
|
||||
factory StatusBadge.giftExpired() =>
|
||||
const StatusBadge(label: 'Hết hạn', color: AppColors.danger);
|
||||
|
||||
/// Member tier badges
|
||||
factory StatusBadge.tierDiamond() => const StatusBadge(
|
||||
label: 'Kim Cương',
|
||||
color: Color(0xFF4A00E0),
|
||||
);
|
||||
factory StatusBadge.tierDiamond() =>
|
||||
const StatusBadge(label: 'Kim Cương', color: Color(0xFF4A00E0));
|
||||
|
||||
factory StatusBadge.tierPlatinum() => const StatusBadge(
|
||||
label: 'Bạch Kim',
|
||||
color: Color(0xFF7F8C8D),
|
||||
);
|
||||
factory StatusBadge.tierPlatinum() =>
|
||||
const StatusBadge(label: 'Bạch Kim', color: Color(0xFF7F8C8D));
|
||||
|
||||
factory StatusBadge.tierGold() => const StatusBadge(
|
||||
label: 'Vàng',
|
||||
color: Color(0xFFf7b733),
|
||||
);
|
||||
factory StatusBadge.tierGold() =>
|
||||
const StatusBadge(label: 'Vàng', color: Color(0xFFf7b733));
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@@ -224,11 +186,7 @@ class IconStatusBadge extends StatelessWidget {
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Icon(
|
||||
icon,
|
||||
size: iconSize,
|
||||
color: textColor ?? Colors.white,
|
||||
),
|
||||
Icon(icon, size: iconSize, color: textColor ?? Colors.white),
|
||||
const SizedBox(width: 4),
|
||||
Text(
|
||||
label,
|
||||
|
||||
Reference in New Issue
Block a user