update icon

This commit is contained in:
Phuoc Nguyen
2025-11-17 09:34:17 +07:00
parent b5f90c364d
commit 49082026f5
12 changed files with 144 additions and 135 deletions

View File

@@ -4,6 +4,7 @@
library;
import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:go_router/go_router.dart';
import 'package:intl/intl.dart';
@@ -34,7 +35,7 @@ class OrderDetailPage extends ConsumerWidget {
backgroundColor: const Color(0xFFF4F6F8),
appBar: AppBar(
leading: IconButton(
icon: const Icon(Icons.arrow_back, color: Colors.black),
icon: const FaIcon(FontAwesomeIcons.arrowLeft, color: Colors.black, size: 20),
onPressed: () => context.pop(),
),
title: const Text(
@@ -43,7 +44,7 @@ class OrderDetailPage extends ConsumerWidget {
),
actions: [
IconButton(
icon: const Icon(Icons.share, color: Colors.black),
icon: const FaIcon(FontAwesomeIcons.shareNodes, color: Colors.black, size: 20),
onPressed: () {
// TODO: Implement share functionality
ScaffoldMessenger.of(context).showSnackBar(
@@ -54,7 +55,7 @@ class OrderDetailPage extends ConsumerWidget {
},
),
IconButton(
icon: const Icon(Icons.print, color: Colors.black),
icon: const FaIcon(FontAwesomeIcons.print, color: Colors.black, size: 20),
onPressed: () {
// TODO: Implement print functionality
ScaffoldMessenger.of(context).showSnackBar(
@@ -145,7 +146,7 @@ class OrderDetailPage extends ConsumerWidget {
),
);
},
icon: const Icon(Icons.phone),
icon: const FaIcon(FontAwesomeIcons.phone, size: 18),
label: const Text('Liên hệ khách hàng'),
style: OutlinedButton.styleFrom(
padding: const EdgeInsets.symmetric(vertical: 12),
@@ -170,7 +171,7 @@ class OrderDetailPage extends ConsumerWidget {
),
);
},
icon: const Icon(Icons.edit),
icon: const FaIcon(FontAwesomeIcons.penToSquare, size: 18),
label: const Text('Cập nhật trạng thái'),
style: ElevatedButton.styleFrom(
padding: const EdgeInsets.symmetric(vertical: 12),
@@ -259,12 +260,12 @@ class OrderDetailPage extends ConsumerWidget {
case 'completed':
iconColor = Colors.white;
iconBgColor = AppColors.success;
iconData = Icons.check;
iconData = FontAwesomeIcons.check;
break;
case 'active':
iconColor = Colors.white;
iconBgColor = AppColors.warning;
iconData = Icons.settings;
iconData = FontAwesomeIcons.gear;
break;
default: // pending
iconColor = AppColors.grey500;
@@ -285,7 +286,7 @@ class OrderDetailPage extends ConsumerWidget {
color: iconBgColor,
shape: BoxShape.circle,
),
child: Icon(iconData, size: 12, color: iconColor),
child: FaIcon(iconData, size: 10, color: iconColor),
),
if (!isLast)
Container(
@@ -333,11 +334,11 @@ class OrderDetailPage extends ConsumerWidget {
/// Get icon for timeline title
IconData _getIconForTitle(String title) {
if (title.contains('Vận chuyển')) {
return Icons.local_shipping;
return FontAwesomeIcons.truck;
} else if (title.contains('Giao hàng')) {
return Icons.inventory_2;
return FontAwesomeIcons.box;
}
return Icons.circle;
return FontAwesomeIcons.solidCircle;
}
/// Build Status Badge
@@ -433,10 +434,10 @@ class OrderDetailPage extends ConsumerWidget {
children: [
Row(
children: [
const Icon(
Icons.local_shipping,
const FaIcon(
FontAwesomeIcons.truck,
color: AppColors.primaryBlue,
size: 20,
size: 18,
),
const SizedBox(width: 8),
const Text(
@@ -468,10 +469,10 @@ class OrderDetailPage extends ConsumerWidget {
color: AppColors.primaryBlue,
borderRadius: BorderRadius.circular(8),
),
child: const Icon(
Icons.local_shipping,
child: const FaIcon(
FontAwesomeIcons.truck,
color: Colors.white,
size: 20,
size: 18,
),
),
const SizedBox(width: 12),
@@ -506,7 +507,7 @@ class OrderDetailPage extends ConsumerWidget {
// Delivery Details
_buildInfoRow(
icon: Icons.calendar_today,
icon: FontAwesomeIcons.calendar,
label: 'Ngày xuất kho',
value: dateFormatter.format(warehouseDate),
valueColor: AppColors.success,
@@ -515,7 +516,7 @@ class OrderDetailPage extends ConsumerWidget {
const SizedBox(height: 12),
_buildInfoRow(
icon: Icons.access_time,
icon: FontAwesomeIcons.clock,
label: 'Thời gian giao hàng',
value: '${dateFormatter.format(deliveryDate)}, 8:00 - 17:00',
),
@@ -523,7 +524,7 @@ class OrderDetailPage extends ConsumerWidget {
const SizedBox(height: 12),
_buildInfoRow(
icon: Icons.location_on,
icon: FontAwesomeIcons.locationDot,
label: 'Địa chỉ giao hàng',
value: deliveryAddress,
),
@@ -531,7 +532,7 @@ class OrderDetailPage extends ConsumerWidget {
const SizedBox(height: 12),
_buildInfoRow(
icon: Icons.person,
icon: FontAwesomeIcons.user,
label: 'Người nhận',
value: '$receiverName - $receiverPhone',
),
@@ -555,7 +556,7 @@ class OrderDetailPage extends ConsumerWidget {
flex: 2,
child: Row(
children: [
Icon(icon, size: 16, color: AppColors.grey500),
FaIcon(icon, size: 14, color: AppColors.grey500),
const SizedBox(width: 6),
Expanded(
child: Text(
@@ -606,10 +607,10 @@ class OrderDetailPage extends ConsumerWidget {
children: [
Row(
children: [
const Icon(
Icons.person_outline,
const FaIcon(
FontAwesomeIcons.user,
color: AppColors.primaryBlue,
size: 20,
size: 18,
),
const SizedBox(width: 8),
const Text(
@@ -724,10 +725,10 @@ class OrderDetailPage extends ConsumerWidget {
children: [
Row(
children: [
const Icon(
Icons.inventory_2,
const FaIcon(
FontAwesomeIcons.box,
color: AppColors.primaryBlue,
size: 20,
size: 18,
),
const SizedBox(width: 8),
const Text(
@@ -762,10 +763,10 @@ class OrderDetailPage extends ConsumerWidget {
color: AppColors.grey50,
borderRadius: BorderRadius.circular(6),
),
child: const Icon(
Icons.image,
child: const FaIcon(
FontAwesomeIcons.image,
color: AppColors.grey500,
size: 30,
size: 28,
),
),
@@ -884,10 +885,10 @@ class OrderDetailPage extends ConsumerWidget {
children: [
Row(
children: [
const Icon(
Icons.receipt_long,
const FaIcon(
FontAwesomeIcons.receipt,
color: AppColors.primaryBlue,
size: 20,
size: 18,
),
const SizedBox(width: 8),
const Text(
@@ -934,9 +935,9 @@ class OrderDetailPage extends ConsumerWidget {
// Payment Method
Row(
children: [
const Icon(
Icons.credit_card,
size: 16,
const FaIcon(
FontAwesomeIcons.creditCard,
size: 14,
color: AppColors.grey500,
),
const SizedBox(width: 6),
@@ -962,7 +963,7 @@ class OrderDetailPage extends ConsumerWidget {
// Order Notes
Row(
children: [
const Icon(Icons.note, size: 16, color: AppColors.grey500),
const FaIcon(FontAwesomeIcons.noteSticky, size: 14, color: AppColors.grey500),
const SizedBox(width: 6),
const Text(
'Ghi chú đơn hàng:',

View File

@@ -4,6 +4,7 @@
library;
import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:go_router/go_router.dart';
import 'package:intl/intl.dart';
@@ -34,7 +35,7 @@ class PaymentDetailPage extends ConsumerWidget {
backgroundColor: const Color(0xFFF4F6F8),
appBar: AppBar(
leading: IconButton(
icon: const Icon(Icons.arrow_back, color: Colors.black),
icon: const FaIcon(FontAwesomeIcons.arrowLeft, color: Colors.black, size: 20),
onPressed: () => context.pop(),
),
title: const Text(
@@ -47,7 +48,7 @@ class PaymentDetailPage extends ConsumerWidget {
centerTitle: false,
actions: [
IconButton(
icon: const Icon(Icons.share, color: Colors.black),
icon: const FaIcon(FontAwesomeIcons.shareNodes, color: Colors.black, size: 20),
onPressed: () {
// TODO: Implement share functionality
ScaffoldMessenger.of(
@@ -128,7 +129,7 @@ class PaymentDetailPage extends ConsumerWidget {
const SnackBar(content: Text('Liên hệ hỗ trợ')),
);
},
icon: const Icon(Icons.chat_bubble_outline),
icon: const FaIcon(FontAwesomeIcons.message, size: 18),
label: const Text('Liên hệ hỗ trợ'),
style: OutlinedButton.styleFrom(
padding: const EdgeInsets.symmetric(
@@ -165,10 +166,11 @@ class PaymentDetailPage extends ConsumerWidget {
),
);
},
icon: Icon(
icon: FaIcon(
(invoice.status == InvoiceStatus.paid || invoice.isPaid)
? Icons.check_circle
: Icons.credit_card,
? FontAwesomeIcons.solidCircleCheck
: FontAwesomeIcons.creditCard,
size: 18,
),
label: Text(
(invoice.status == InvoiceStatus.paid || invoice.isPaid)
@@ -203,8 +205,8 @@ class PaymentDetailPage extends ConsumerWidget {
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
const Icon(
Icons.error_outline,
const FaIcon(
FontAwesomeIcons.circleExclamation,
size: 64,
color: AppColors.danger,
),
@@ -456,7 +458,7 @@ class PaymentDetailPage extends ConsumerWidget {
children: [
Row(
children: [
Icon(Icons.inventory_2, color: AppColors.primaryBlue, size: 20),
FaIcon(FontAwesomeIcons.box, color: AppColors.primaryBlue, size: 18),
const SizedBox(width: 8),
const Text(
'Danh sách sản phẩm',
@@ -490,10 +492,10 @@ class PaymentDetailPage extends ConsumerWidget {
color: AppColors.grey50,
borderRadius: BorderRadius.circular(8),
),
child: const Icon(
Icons.image,
child: const FaIcon(
FontAwesomeIcons.image,
color: AppColors.grey500,
size: 24,
size: 22,
),
),
const SizedBox(width: 16),
@@ -572,7 +574,7 @@ class PaymentDetailPage extends ConsumerWidget {
children: [
Row(
children: [
Icon(Icons.history, color: AppColors.primaryBlue, size: 20),
FaIcon(FontAwesomeIcons.clockRotateLeft, color: AppColors.primaryBlue, size: 18),
const SizedBox(width: 8),
const Text(
'Lịch sử thanh toán',
@@ -602,10 +604,10 @@ class PaymentDetailPage extends ConsumerWidget {
color: AppColors.success.withValues(alpha: 0.1),
shape: BoxShape.circle,
),
child: const Icon(
Icons.check,
child: const FaIcon(
FontAwesomeIcons.check,
color: AppColors.success,
size: 20,
size: 18,
),
),
const SizedBox(width: 16),
@@ -657,8 +659,8 @@ class PaymentDetailPage extends ConsumerWidget {
padding: const EdgeInsets.symmetric(vertical: 20),
child: Column(
children: [
Icon(
Icons.receipt_long_outlined,
FaIcon(
FontAwesomeIcons.receipt,
size: 48,
color: AppColors.grey100,
),
@@ -701,7 +703,7 @@ class PaymentDetailPage extends ConsumerWidget {
children: [
const Row(
children: [
Icon(Icons.download, color: AppColors.primaryBlue, size: 20),
FaIcon(FontAwesomeIcons.download, color: AppColors.primaryBlue, size: 18),
SizedBox(width: 8),
Text(
'Tải chứng từ',
@@ -715,7 +717,7 @@ class PaymentDetailPage extends ConsumerWidget {
),
const SizedBox(height: 16),
_buildDownloadButton(
icon: Icons.picture_as_pdf,
icon: FontAwesomeIcons.filePdf,
label: 'Hóa đơn PDF',
onTap: () {
// TODO: Download invoice PDF
@@ -723,7 +725,7 @@ class PaymentDetailPage extends ConsumerWidget {
),
const SizedBox(height: 12),
_buildDownloadButton(
icon: Icons.receipt,
icon: FontAwesomeIcons.receipt,
label: 'Phiếu thu PDF',
onTap: () {
// TODO: Download receipt PDF
@@ -754,7 +756,7 @@ class PaymentDetailPage extends ConsumerWidget {
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Icon(icon, size: 20, color: AppColors.grey500),
FaIcon(icon, size: 18, color: AppColors.grey500),
const SizedBox(width: 8),
Flexible(
child: Text(

View File

@@ -14,6 +14,7 @@ import 'dart:async';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_hooks/flutter_hooks.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'package:go_router/go_router.dart';
import 'package:hooks_riverpod/hooks_riverpod.dart';
@@ -62,7 +63,7 @@ class PaymentQrPage extends HookConsumerWidget {
backgroundColor: Colors.white,
elevation: 0,
leading: IconButton(
icon: const Icon(Icons.arrow_back, color: Colors.black),
icon: const FaIcon(FontAwesomeIcons.arrowLeft, color: Colors.black, size: 20),
onPressed: () => context.pop(),
),
title: const Text(
@@ -76,7 +77,7 @@ class PaymentQrPage extends HookConsumerWidget {
centerTitle: false,
actions: [
IconButton(
icon: const Icon(Icons.info_outline, color: Colors.black),
icon: const FaIcon(FontAwesomeIcons.circleInfo, color: Colors.black, size: 20),
onPressed: () => _showInfoDialog(context),
),
const SizedBox(width: AppSpacing.sm),
@@ -158,7 +159,7 @@ class PaymentQrPage extends HookConsumerWidget {
),
child: Row(
children: [
const Icon(Icons.info, color: AppColors.warning, size: 20),
const FaIcon(FontAwesomeIcons.circleInfo, color: AppColors.warning, size: 18),
const SizedBox(width: 8),
Expanded(
child: Text(
@@ -228,7 +229,7 @@ class PaymentQrPage extends HookConsumerWidget {
return const Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Icon(Icons.qr_code, size: 80, color: AppColors.grey500),
FaIcon(FontAwesomeIcons.qrcode, size: 80, color: AppColors.grey500),
SizedBox(height: 8),
Text(
'Không thể tải mã QR',
@@ -322,10 +323,10 @@ class PaymentQrPage extends HookConsumerWidget {
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
const Icon(
Icons.lightbulb_outline,
const FaIcon(
FontAwesomeIcons.lightbulb,
color: AppColors.primaryBlue,
size: 20,
size: 18,
),
const SizedBox(width: 8),
Expanded(
@@ -384,7 +385,7 @@ class PaymentQrPage extends HookConsumerWidget {
),
),
IconButton(
icon: const Icon(Icons.copy, size: 20, color: AppColors.primaryBlue),
icon: const FaIcon(FontAwesomeIcons.copy, size: 18, color: AppColors.primaryBlue),
onPressed: () => _copyToClipboard(context, value),
padding: EdgeInsets.zero,
constraints: const BoxConstraints(),
@@ -403,7 +404,7 @@ class PaymentQrPage extends HookConsumerWidget {
Expanded(
child: OutlinedButton.icon(
onPressed: () => _confirmPayment(context),
icon: const Icon(Icons.check, size: 20),
icon: const FaIcon(FontAwesomeIcons.check, size: 18),
label: const Text(
'Đã thanh toán',
style: TextStyle(fontSize: 15, fontWeight: FontWeight.w600),
@@ -427,7 +428,7 @@ class PaymentQrPage extends HookConsumerWidget {
Expanded(
child: ElevatedButton.icon(
onPressed: () => _uploadProof(context),
icon: const Icon(Icons.camera_alt, size: 20),
icon: const FaIcon(FontAwesomeIcons.camera, size: 18),
label: const Text(
'Upload bill',
style: TextStyle(fontSize: 15, fontWeight: FontWeight.w600),
@@ -460,7 +461,7 @@ class PaymentQrPage extends HookConsumerWidget {
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
const Icon(Icons.schedule, size: 18, color: AppColors.grey500),
const FaIcon(FontAwesomeIcons.clock, size: 16, color: AppColors.grey500),
const SizedBox(width: 8),
const Text(
'Thời gian thanh toán: ',