update icon
This commit is contained in:
@@ -96,6 +96,7 @@ You have access to these expert subagents - USE THEM PROACTIVELY:
|
||||
- Follow iOS and Android platform-specific design guidelines
|
||||
- Support Vietnamese language (primary) and English (secondary)
|
||||
- Mobile-first design optimized for phone screens
|
||||
- Use FontAwesomeIcon
|
||||
|
||||
### Hive Best Practices
|
||||
**IMPORTANT: Box Type Management**
|
||||
|
||||
@@ -9,6 +9,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:worker/core/constants/ui_constants.dart';
|
||||
@@ -174,7 +175,7 @@ class AccountPage extends ConsumerWidget {
|
||||
child: Column(
|
||||
children: [
|
||||
AccountMenuItem(
|
||||
icon: Icons.edit,
|
||||
icon: FontAwesomeIcons.penToSquare,
|
||||
title: 'Thông tin cá nhân',
|
||||
subtitle: 'Cập nhật thông tin tài khoản',
|
||||
onTap: () {
|
||||
@@ -182,7 +183,7 @@ class AccountPage extends ConsumerWidget {
|
||||
},
|
||||
),
|
||||
AccountMenuItem(
|
||||
icon: Icons.history,
|
||||
icon: FontAwesomeIcons.clockRotateLeft,
|
||||
title: 'Lịch sử đơn hàng',
|
||||
subtitle: 'Xem các đơn hàng đã đặt',
|
||||
onTap: () {
|
||||
@@ -190,7 +191,7 @@ class AccountPage extends ConsumerWidget {
|
||||
},
|
||||
),
|
||||
AccountMenuItem(
|
||||
icon: Icons.location_on,
|
||||
icon: FontAwesomeIcons.locationDot,
|
||||
title: 'Địa chỉ đã lưu',
|
||||
subtitle: 'Quản lý địa chỉ giao hàng',
|
||||
onTap: () {
|
||||
@@ -198,7 +199,7 @@ class AccountPage extends ConsumerWidget {
|
||||
},
|
||||
),
|
||||
AccountMenuItem(
|
||||
icon: Icons.notifications,
|
||||
icon: FontAwesomeIcons.bell,
|
||||
title: 'Cài đặt thông báo',
|
||||
subtitle: 'Quản lý thông báo đẩy',
|
||||
onTap: () {
|
||||
@@ -206,7 +207,7 @@ class AccountPage extends ConsumerWidget {
|
||||
},
|
||||
),
|
||||
AccountMenuItem(
|
||||
icon: Icons.lock,
|
||||
icon: FontAwesomeIcons.lock,
|
||||
title: 'Đổi mật khẩu',
|
||||
subtitle: 'Cập nhật mật khẩu mới',
|
||||
onTap: () {
|
||||
@@ -214,7 +215,7 @@ class AccountPage extends ConsumerWidget {
|
||||
},
|
||||
),
|
||||
AccountMenuItem(
|
||||
icon: Icons.language,
|
||||
icon: FontAwesomeIcons.language,
|
||||
title: 'Ngôn ngữ',
|
||||
subtitle: 'Tiếng Việt',
|
||||
onTap: () {
|
||||
@@ -264,12 +265,12 @@ class AccountPage extends ConsumerWidget {
|
||||
|
||||
// Support menu items
|
||||
AccountMenuItem(
|
||||
icon: Icons.headset_mic,
|
||||
icon: FontAwesomeIcons.headset,
|
||||
title: 'Liên hệ hỗ trợ',
|
||||
subtitle: 'Hotline: 1900 1234',
|
||||
trailing: const Icon(
|
||||
Icons.phone,
|
||||
size: 20,
|
||||
trailing: const FaIcon(
|
||||
FontAwesomeIcons.phone,
|
||||
size: 18,
|
||||
color: AppColors.grey500,
|
||||
),
|
||||
onTap: () {
|
||||
@@ -282,14 +283,14 @@ class AccountPage extends ConsumerWidget {
|
||||
},
|
||||
),
|
||||
AccountMenuItem(
|
||||
icon: Icons.help_outline,
|
||||
icon: FontAwesomeIcons.circleQuestion,
|
||||
title: 'Câu hỏi thường gặp',
|
||||
onTap: () {
|
||||
_showComingSoon(context);
|
||||
},
|
||||
),
|
||||
AccountMenuItem(
|
||||
icon: Icons.info_outline,
|
||||
icon: FontAwesomeIcons.circleInfo,
|
||||
title: 'Về ứng dụng',
|
||||
subtitle: 'Phiên bản 1.0.0',
|
||||
onTap: () {
|
||||
@@ -310,7 +311,7 @@ class AccountPage extends ConsumerWidget {
|
||||
onPressed: () {
|
||||
_showLogoutConfirmation(context, ref);
|
||||
},
|
||||
icon: const Icon(Icons.logout),
|
||||
icon: const FaIcon(FontAwesomeIcons.arrowRightFromBracket, size: 18),
|
||||
label: const Text('Đăng xuất'),
|
||||
style: OutlinedButton.styleFrom(
|
||||
foregroundColor: AppColors.danger,
|
||||
|
||||
@@ -57,7 +57,7 @@ class AddressesPage 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(
|
||||
@@ -71,7 +71,7 @@ class AddressesPage extends HookConsumerWidget {
|
||||
centerTitle: false,
|
||||
actions: [
|
||||
IconButton(
|
||||
icon: const Icon(Icons.add, color: Colors.black),
|
||||
icon: const FaIcon(FontAwesomeIcons.plus, color: Colors.black, size: 20),
|
||||
onPressed: () {
|
||||
_showAddAddress(context);
|
||||
},
|
||||
@@ -120,7 +120,7 @@ class AddressesPage extends HookConsumerWidget {
|
||||
onPressed: () {
|
||||
_showAddAddress(context);
|
||||
},
|
||||
icon: const Icon(Icons.add, size: 20),
|
||||
icon: const FaIcon(FontAwesomeIcons.plus, size: 18),
|
||||
label: const Text(
|
||||
'Thêm địa chỉ mới',
|
||||
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600),
|
||||
@@ -148,8 +148,8 @@ class AddressesPage extends HookConsumerWidget {
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Icon(
|
||||
Icons.location_off,
|
||||
FaIcon(
|
||||
FontAwesomeIcons.locationDot,
|
||||
size: 64,
|
||||
color: AppColors.grey500.withValues(alpha: 0.5),
|
||||
),
|
||||
@@ -172,7 +172,7 @@ class AddressesPage extends HookConsumerWidget {
|
||||
onPressed: () {
|
||||
_showAddAddress(context);
|
||||
},
|
||||
icon: const Icon(Icons.add, size: 20),
|
||||
icon: const FaIcon(FontAwesomeIcons.plus, size: 18),
|
||||
label: const Text(
|
||||
'Thêm địa chỉ mới',
|
||||
style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600),
|
||||
|
||||
@@ -68,7 +68,7 @@ class ChangePasswordPage 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(
|
||||
@@ -177,11 +177,11 @@ class ChangePasswordPage extends HookConsumerWidget {
|
||||
const SizedBox(height: 8),
|
||||
Row(
|
||||
children: [
|
||||
Icon(
|
||||
FaIcon(
|
||||
passwordsMatch.value == true
|
||||
? Icons.check_circle
|
||||
: Icons.error,
|
||||
size: 16,
|
||||
? FontAwesomeIcons.solidCircleCheck
|
||||
: FontAwesomeIcons.circleXmark,
|
||||
size: 14,
|
||||
color: passwordsMatch.value == true
|
||||
? AppColors.success
|
||||
: AppColors.danger,
|
||||
@@ -276,9 +276,9 @@ class ChangePasswordPage extends HookConsumerWidget {
|
||||
vertical: 12,
|
||||
),
|
||||
suffixIcon: IconButton(
|
||||
icon: Icon(
|
||||
isVisible.value ? Icons.visibility_off : Icons.visibility,
|
||||
size: 20,
|
||||
icon: FaIcon(
|
||||
isVisible.value ? FontAwesomeIcons.eyeSlash : FontAwesomeIcons.eye,
|
||||
size: 18,
|
||||
color: AppColors.grey500,
|
||||
),
|
||||
onPressed: () {
|
||||
@@ -359,9 +359,9 @@ class ChangePasswordPage extends HookConsumerWidget {
|
||||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
const Icon(
|
||||
Icons.check_circle_outline,
|
||||
size: 16,
|
||||
const FaIcon(
|
||||
FontAwesomeIcons.circleCheck,
|
||||
size: 14,
|
||||
color: AppColors.success,
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
@@ -431,7 +431,7 @@ class ChangePasswordPage extends HookConsumerWidget {
|
||||
);
|
||||
}
|
||||
},
|
||||
icon: const Icon(Icons.key, size: 20),
|
||||
icon: const FaIcon(FontAwesomeIcons.key, size: 18),
|
||||
label: const Text(
|
||||
'Đổi mật khẩu',
|
||||
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600),
|
||||
|
||||
@@ -72,7 +72,7 @@ class ProfileEditPage 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: () async {
|
||||
if (hasChanges.value) {
|
||||
final shouldPop = await _showUnsavedChangesDialog(context);
|
||||
@@ -338,9 +338,9 @@ class ProfileEditPage extends HookConsumerWidget {
|
||||
),
|
||||
],
|
||||
),
|
||||
child: const Icon(
|
||||
Icons.camera_alt,
|
||||
size: 16,
|
||||
child: const FaIcon(
|
||||
FontAwesomeIcons.camera,
|
||||
size: 14,
|
||||
color: Colors.white,
|
||||
),
|
||||
),
|
||||
@@ -472,7 +472,7 @@ class ProfileEditPage extends HookConsumerWidget {
|
||||
horizontal: 16,
|
||||
vertical: 12,
|
||||
),
|
||||
suffixIcon: const Icon(Icons.calendar_today, size: 20),
|
||||
suffixIcon: const FaIcon(FontAwesomeIcons.calendar, size: 18),
|
||||
border: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(AppRadius.input),
|
||||
borderSide: const BorderSide(color: Color(0xFFE2E8F0)),
|
||||
@@ -604,7 +604,7 @@ class ProfileEditPage extends HookConsumerWidget {
|
||||
context.pop();
|
||||
}
|
||||
},
|
||||
icon: const Icon(Icons.save, size: 20),
|
||||
icon: const FaIcon(FontAwesomeIcons.floppyDisk, size: 18),
|
||||
label: const Text(
|
||||
'Lưu thay đổi',
|
||||
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600),
|
||||
@@ -641,12 +641,12 @@ class ProfileEditPage extends HookConsumerWidget {
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
ListTile(
|
||||
leading: const Icon(Icons.camera_alt),
|
||||
leading: const FaIcon(FontAwesomeIcons.camera, size: 18),
|
||||
title: const Text('Máy ảnh'),
|
||||
onTap: () => Navigator.pop(context, ImageSource.camera),
|
||||
),
|
||||
ListTile(
|
||||
leading: const Icon(Icons.photo_library),
|
||||
leading: const FaIcon(FontAwesomeIcons.images, size: 18),
|
||||
title: const Text('Thư viện ảnh'),
|
||||
onTap: () => Navigator.pop(context, ImageSource.gallery),
|
||||
),
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
library;
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
||||
import 'package:worker/core/constants/ui_constants.dart';
|
||||
import 'package:worker/core/theme/colors.dart';
|
||||
|
||||
@@ -74,9 +75,9 @@ class AccountMenuItem extends StatelessWidget {
|
||||
AppColors.lightBlue.withValues(alpha: 0.1),
|
||||
shape: BoxShape.circle,
|
||||
),
|
||||
child: Icon(
|
||||
child: FaIcon(
|
||||
icon,
|
||||
size: 20,
|
||||
size: 18,
|
||||
color: iconColor ?? AppColors.primaryBlue,
|
||||
),
|
||||
),
|
||||
@@ -111,9 +112,9 @@ class AccountMenuItem extends StatelessWidget {
|
||||
|
||||
// Trailing widget (default: chevron)
|
||||
trailing ??
|
||||
const Icon(
|
||||
Icons.chevron_right,
|
||||
size: 20,
|
||||
const FaIcon(
|
||||
FontAwesomeIcons.chevronRight,
|
||||
size: 18,
|
||||
color: AppColors.grey500,
|
||||
),
|
||||
],
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
library;
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
||||
import 'package:worker/core/constants/ui_constants.dart';
|
||||
import 'package:worker/core/theme/colors.dart';
|
||||
|
||||
@@ -156,9 +157,9 @@ class AddressCard extends StatelessWidget {
|
||||
border: Border.all(color: const Color(0xFFE2E8F0)),
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
),
|
||||
child: const Icon(
|
||||
Icons.edit,
|
||||
size: 18,
|
||||
child: const FaIcon(
|
||||
FontAwesomeIcons.penToSquare,
|
||||
size: 16,
|
||||
color: AppColors.primaryBlue,
|
||||
),
|
||||
),
|
||||
@@ -178,9 +179,9 @@ class AddressCard extends StatelessWidget {
|
||||
border: Border.all(color: const Color(0xFFE2E8F0)),
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
),
|
||||
child: const Icon(
|
||||
Icons.delete,
|
||||
size: 18,
|
||||
child: const FaIcon(
|
||||
FontAwesomeIcons.trashCan,
|
||||
size: 16,
|
||||
color: AppColors.danger,
|
||||
),
|
||||
),
|
||||
|
||||
@@ -194,8 +194,8 @@ class NotificationsPage extends HookConsumerWidget {
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Icon(
|
||||
Icons.notifications_none,
|
||||
FaIcon(
|
||||
FontAwesomeIcons.bell,
|
||||
size: 64,
|
||||
color: AppColors.grey500.withValues(alpha: 0.5),
|
||||
),
|
||||
@@ -227,8 +227,8 @@ class NotificationsPage extends HookConsumerWidget {
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Icon(
|
||||
Icons.error_outline,
|
||||
FaIcon(
|
||||
FontAwesomeIcons.circleExclamation,
|
||||
size: 64,
|
||||
color: AppColors.danger.withValues(alpha: 0.5),
|
||||
),
|
||||
@@ -248,7 +248,7 @@ class NotificationsPage extends HookConsumerWidget {
|
||||
filteredNotificationsProvider(selectedCategory.value),
|
||||
);
|
||||
},
|
||||
icon: const Icon(Icons.refresh),
|
||||
icon: const FaIcon(FontAwesomeIcons.arrowsRotate, size: 18),
|
||||
label: const Text('Thử lại'),
|
||||
style: ElevatedButton.styleFrom(
|
||||
backgroundColor: AppColors.primaryBlue,
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
library;
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
||||
import 'package:worker/core/constants/ui_constants.dart';
|
||||
import 'package:worker/core/theme/colors.dart';
|
||||
import 'package:worker/features/notifications/domain/entities/notification.dart'
|
||||
@@ -62,7 +63,7 @@ class NotificationCard extends StatelessWidget {
|
||||
Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Icon(_getIcon(), size: 18, color: _getIconColor()),
|
||||
FaIcon(_getIcon(), size: 16, color: _getIconColor()),
|
||||
const SizedBox(width: 8),
|
||||
Expanded(
|
||||
child: Text(
|
||||
@@ -119,21 +120,21 @@ class NotificationCard extends StatelessWidget {
|
||||
final type = notification.type.toLowerCase();
|
||||
|
||||
if (type.contains('points') || type.contains('loyalty')) {
|
||||
return Icons.card_giftcard;
|
||||
return FontAwesomeIcons.gift;
|
||||
} else if (type.contains('promotion') || type.contains('sale')) {
|
||||
return Icons.local_offer;
|
||||
return FontAwesomeIcons.tag;
|
||||
} else if (type.contains('shipping')) {
|
||||
return Icons.local_shipping;
|
||||
return FontAwesomeIcons.truck;
|
||||
} else if (type.contains('tier') || type.contains('upgrade')) {
|
||||
return Icons.workspace_premium;
|
||||
return FontAwesomeIcons.crown;
|
||||
} else if (type.contains('event')) {
|
||||
return Icons.event;
|
||||
return FontAwesomeIcons.calendarDays;
|
||||
} else if (type.contains('confirmed')) {
|
||||
return Icons.check_circle;
|
||||
return FontAwesomeIcons.solidCircleCheck;
|
||||
} else if (type.contains('birthday')) {
|
||||
return Icons.cake;
|
||||
return FontAwesomeIcons.cakeCandles;
|
||||
} else {
|
||||
return Icons.notifications;
|
||||
return FontAwesomeIcons.bell;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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:',
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -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: ',
|
||||
|
||||
Reference in New Issue
Block a user