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
|
- Follow iOS and Android platform-specific design guidelines
|
||||||
- Support Vietnamese language (primary) and English (secondary)
|
- Support Vietnamese language (primary) and English (secondary)
|
||||||
- Mobile-first design optimized for phone screens
|
- Mobile-first design optimized for phone screens
|
||||||
|
- Use FontAwesomeIcon
|
||||||
|
|
||||||
### Hive Best Practices
|
### Hive Best Practices
|
||||||
**IMPORTANT: Box Type Management**
|
**IMPORTANT: Box Type Management**
|
||||||
|
|||||||
@@ -9,6 +9,7 @@
|
|||||||
library;
|
library;
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
||||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||||
import 'package:go_router/go_router.dart';
|
import 'package:go_router/go_router.dart';
|
||||||
import 'package:worker/core/constants/ui_constants.dart';
|
import 'package:worker/core/constants/ui_constants.dart';
|
||||||
@@ -174,7 +175,7 @@ class AccountPage extends ConsumerWidget {
|
|||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
AccountMenuItem(
|
AccountMenuItem(
|
||||||
icon: Icons.edit,
|
icon: FontAwesomeIcons.penToSquare,
|
||||||
title: 'Thông tin cá nhân',
|
title: 'Thông tin cá nhân',
|
||||||
subtitle: 'Cập nhật thông tin tài khoản',
|
subtitle: 'Cập nhật thông tin tài khoản',
|
||||||
onTap: () {
|
onTap: () {
|
||||||
@@ -182,7 +183,7 @@ class AccountPage extends ConsumerWidget {
|
|||||||
},
|
},
|
||||||
),
|
),
|
||||||
AccountMenuItem(
|
AccountMenuItem(
|
||||||
icon: Icons.history,
|
icon: FontAwesomeIcons.clockRotateLeft,
|
||||||
title: 'Lịch sử đơn hàng',
|
title: 'Lịch sử đơn hàng',
|
||||||
subtitle: 'Xem các đơn hàng đã đặt',
|
subtitle: 'Xem các đơn hàng đã đặt',
|
||||||
onTap: () {
|
onTap: () {
|
||||||
@@ -190,7 +191,7 @@ class AccountPage extends ConsumerWidget {
|
|||||||
},
|
},
|
||||||
),
|
),
|
||||||
AccountMenuItem(
|
AccountMenuItem(
|
||||||
icon: Icons.location_on,
|
icon: FontAwesomeIcons.locationDot,
|
||||||
title: 'Địa chỉ đã lưu',
|
title: 'Địa chỉ đã lưu',
|
||||||
subtitle: 'Quản lý địa chỉ giao hàng',
|
subtitle: 'Quản lý địa chỉ giao hàng',
|
||||||
onTap: () {
|
onTap: () {
|
||||||
@@ -198,7 +199,7 @@ class AccountPage extends ConsumerWidget {
|
|||||||
},
|
},
|
||||||
),
|
),
|
||||||
AccountMenuItem(
|
AccountMenuItem(
|
||||||
icon: Icons.notifications,
|
icon: FontAwesomeIcons.bell,
|
||||||
title: 'Cài đặt thông báo',
|
title: 'Cài đặt thông báo',
|
||||||
subtitle: 'Quản lý thông báo đẩy',
|
subtitle: 'Quản lý thông báo đẩy',
|
||||||
onTap: () {
|
onTap: () {
|
||||||
@@ -206,7 +207,7 @@ class AccountPage extends ConsumerWidget {
|
|||||||
},
|
},
|
||||||
),
|
),
|
||||||
AccountMenuItem(
|
AccountMenuItem(
|
||||||
icon: Icons.lock,
|
icon: FontAwesomeIcons.lock,
|
||||||
title: 'Đổi mật khẩu',
|
title: 'Đổi mật khẩu',
|
||||||
subtitle: 'Cập nhật mật khẩu mới',
|
subtitle: 'Cập nhật mật khẩu mới',
|
||||||
onTap: () {
|
onTap: () {
|
||||||
@@ -214,7 +215,7 @@ class AccountPage extends ConsumerWidget {
|
|||||||
},
|
},
|
||||||
),
|
),
|
||||||
AccountMenuItem(
|
AccountMenuItem(
|
||||||
icon: Icons.language,
|
icon: FontAwesomeIcons.language,
|
||||||
title: 'Ngôn ngữ',
|
title: 'Ngôn ngữ',
|
||||||
subtitle: 'Tiếng Việt',
|
subtitle: 'Tiếng Việt',
|
||||||
onTap: () {
|
onTap: () {
|
||||||
@@ -264,12 +265,12 @@ class AccountPage extends ConsumerWidget {
|
|||||||
|
|
||||||
// Support menu items
|
// Support menu items
|
||||||
AccountMenuItem(
|
AccountMenuItem(
|
||||||
icon: Icons.headset_mic,
|
icon: FontAwesomeIcons.headset,
|
||||||
title: 'Liên hệ hỗ trợ',
|
title: 'Liên hệ hỗ trợ',
|
||||||
subtitle: 'Hotline: 1900 1234',
|
subtitle: 'Hotline: 1900 1234',
|
||||||
trailing: const Icon(
|
trailing: const FaIcon(
|
||||||
Icons.phone,
|
FontAwesomeIcons.phone,
|
||||||
size: 20,
|
size: 18,
|
||||||
color: AppColors.grey500,
|
color: AppColors.grey500,
|
||||||
),
|
),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
@@ -282,14 +283,14 @@ class AccountPage extends ConsumerWidget {
|
|||||||
},
|
},
|
||||||
),
|
),
|
||||||
AccountMenuItem(
|
AccountMenuItem(
|
||||||
icon: Icons.help_outline,
|
icon: FontAwesomeIcons.circleQuestion,
|
||||||
title: 'Câu hỏi thường gặp',
|
title: 'Câu hỏi thường gặp',
|
||||||
onTap: () {
|
onTap: () {
|
||||||
_showComingSoon(context);
|
_showComingSoon(context);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
AccountMenuItem(
|
AccountMenuItem(
|
||||||
icon: Icons.info_outline,
|
icon: FontAwesomeIcons.circleInfo,
|
||||||
title: 'Về ứng dụng',
|
title: 'Về ứng dụng',
|
||||||
subtitle: 'Phiên bản 1.0.0',
|
subtitle: 'Phiên bản 1.0.0',
|
||||||
onTap: () {
|
onTap: () {
|
||||||
@@ -310,7 +311,7 @@ class AccountPage extends ConsumerWidget {
|
|||||||
onPressed: () {
|
onPressed: () {
|
||||||
_showLogoutConfirmation(context, ref);
|
_showLogoutConfirmation(context, ref);
|
||||||
},
|
},
|
||||||
icon: const Icon(Icons.logout),
|
icon: const FaIcon(FontAwesomeIcons.arrowRightFromBracket, size: 18),
|
||||||
label: const Text('Đăng xuất'),
|
label: const Text('Đăng xuất'),
|
||||||
style: OutlinedButton.styleFrom(
|
style: OutlinedButton.styleFrom(
|
||||||
foregroundColor: AppColors.danger,
|
foregroundColor: AppColors.danger,
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ class AddressesPage extends HookConsumerWidget {
|
|||||||
backgroundColor: Colors.white,
|
backgroundColor: Colors.white,
|
||||||
elevation: 0,
|
elevation: 0,
|
||||||
leading: IconButton(
|
leading: IconButton(
|
||||||
icon: const Icon(Icons.arrow_back, color: Colors.black),
|
icon: const FaIcon(FontAwesomeIcons.arrowLeft, color: Colors.black, size: 20),
|
||||||
onPressed: () => context.pop(),
|
onPressed: () => context.pop(),
|
||||||
),
|
),
|
||||||
title: const Text(
|
title: const Text(
|
||||||
@@ -71,7 +71,7 @@ class AddressesPage extends HookConsumerWidget {
|
|||||||
centerTitle: false,
|
centerTitle: false,
|
||||||
actions: [
|
actions: [
|
||||||
IconButton(
|
IconButton(
|
||||||
icon: const Icon(Icons.add, color: Colors.black),
|
icon: const FaIcon(FontAwesomeIcons.plus, color: Colors.black, size: 20),
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
_showAddAddress(context);
|
_showAddAddress(context);
|
||||||
},
|
},
|
||||||
@@ -120,7 +120,7 @@ class AddressesPage extends HookConsumerWidget {
|
|||||||
onPressed: () {
|
onPressed: () {
|
||||||
_showAddAddress(context);
|
_showAddAddress(context);
|
||||||
},
|
},
|
||||||
icon: const Icon(Icons.add, size: 20),
|
icon: const FaIcon(FontAwesomeIcons.plus, size: 18),
|
||||||
label: const Text(
|
label: const Text(
|
||||||
'Thêm địa chỉ mới',
|
'Thêm địa chỉ mới',
|
||||||
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600),
|
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600),
|
||||||
@@ -148,8 +148,8 @@ class AddressesPage extends HookConsumerWidget {
|
|||||||
child: Column(
|
child: Column(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Icon(
|
FaIcon(
|
||||||
Icons.location_off,
|
FontAwesomeIcons.locationDot,
|
||||||
size: 64,
|
size: 64,
|
||||||
color: AppColors.grey500.withValues(alpha: 0.5),
|
color: AppColors.grey500.withValues(alpha: 0.5),
|
||||||
),
|
),
|
||||||
@@ -172,7 +172,7 @@ class AddressesPage extends HookConsumerWidget {
|
|||||||
onPressed: () {
|
onPressed: () {
|
||||||
_showAddAddress(context);
|
_showAddAddress(context);
|
||||||
},
|
},
|
||||||
icon: const Icon(Icons.add, size: 20),
|
icon: const FaIcon(FontAwesomeIcons.plus, size: 18),
|
||||||
label: const Text(
|
label: const Text(
|
||||||
'Thêm địa chỉ mới',
|
'Thêm địa chỉ mới',
|
||||||
style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600),
|
style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600),
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ class ChangePasswordPage extends HookConsumerWidget {
|
|||||||
backgroundColor: Colors.white,
|
backgroundColor: Colors.white,
|
||||||
elevation: 0,
|
elevation: 0,
|
||||||
leading: IconButton(
|
leading: IconButton(
|
||||||
icon: const Icon(Icons.arrow_back, color: Colors.black),
|
icon: const FaIcon(FontAwesomeIcons.arrowLeft, color: Colors.black, size: 20),
|
||||||
onPressed: () => context.pop(),
|
onPressed: () => context.pop(),
|
||||||
),
|
),
|
||||||
title: const Text(
|
title: const Text(
|
||||||
@@ -177,11 +177,11 @@ class ChangePasswordPage extends HookConsumerWidget {
|
|||||||
const SizedBox(height: 8),
|
const SizedBox(height: 8),
|
||||||
Row(
|
Row(
|
||||||
children: [
|
children: [
|
||||||
Icon(
|
FaIcon(
|
||||||
passwordsMatch.value == true
|
passwordsMatch.value == true
|
||||||
? Icons.check_circle
|
? FontAwesomeIcons.solidCircleCheck
|
||||||
: Icons.error,
|
: FontAwesomeIcons.circleXmark,
|
||||||
size: 16,
|
size: 14,
|
||||||
color: passwordsMatch.value == true
|
color: passwordsMatch.value == true
|
||||||
? AppColors.success
|
? AppColors.success
|
||||||
: AppColors.danger,
|
: AppColors.danger,
|
||||||
@@ -276,9 +276,9 @@ class ChangePasswordPage extends HookConsumerWidget {
|
|||||||
vertical: 12,
|
vertical: 12,
|
||||||
),
|
),
|
||||||
suffixIcon: IconButton(
|
suffixIcon: IconButton(
|
||||||
icon: Icon(
|
icon: FaIcon(
|
||||||
isVisible.value ? Icons.visibility_off : Icons.visibility,
|
isVisible.value ? FontAwesomeIcons.eyeSlash : FontAwesomeIcons.eye,
|
||||||
size: 20,
|
size: 18,
|
||||||
color: AppColors.grey500,
|
color: AppColors.grey500,
|
||||||
),
|
),
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
@@ -359,9 +359,9 @@ class ChangePasswordPage extends HookConsumerWidget {
|
|||||||
child: Row(
|
child: Row(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
const Icon(
|
const FaIcon(
|
||||||
Icons.check_circle_outline,
|
FontAwesomeIcons.circleCheck,
|
||||||
size: 16,
|
size: 14,
|
||||||
color: AppColors.success,
|
color: AppColors.success,
|
||||||
),
|
),
|
||||||
const SizedBox(width: 8),
|
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(
|
label: const Text(
|
||||||
'Đổi mật khẩu',
|
'Đổi mật khẩu',
|
||||||
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600),
|
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600),
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ class ProfileEditPage extends HookConsumerWidget {
|
|||||||
backgroundColor: Colors.white,
|
backgroundColor: Colors.white,
|
||||||
elevation: 0,
|
elevation: 0,
|
||||||
leading: IconButton(
|
leading: IconButton(
|
||||||
icon: const Icon(Icons.arrow_back, color: Colors.black),
|
icon: const FaIcon(FontAwesomeIcons.arrowLeft, color: Colors.black, size: 20),
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
if (hasChanges.value) {
|
if (hasChanges.value) {
|
||||||
final shouldPop = await _showUnsavedChangesDialog(context);
|
final shouldPop = await _showUnsavedChangesDialog(context);
|
||||||
@@ -338,9 +338,9 @@ class ProfileEditPage extends HookConsumerWidget {
|
|||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
child: const Icon(
|
child: const FaIcon(
|
||||||
Icons.camera_alt,
|
FontAwesomeIcons.camera,
|
||||||
size: 16,
|
size: 14,
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -472,7 +472,7 @@ class ProfileEditPage extends HookConsumerWidget {
|
|||||||
horizontal: 16,
|
horizontal: 16,
|
||||||
vertical: 12,
|
vertical: 12,
|
||||||
),
|
),
|
||||||
suffixIcon: const Icon(Icons.calendar_today, size: 20),
|
suffixIcon: const FaIcon(FontAwesomeIcons.calendar, size: 18),
|
||||||
border: OutlineInputBorder(
|
border: OutlineInputBorder(
|
||||||
borderRadius: BorderRadius.circular(AppRadius.input),
|
borderRadius: BorderRadius.circular(AppRadius.input),
|
||||||
borderSide: const BorderSide(color: Color(0xFFE2E8F0)),
|
borderSide: const BorderSide(color: Color(0xFFE2E8F0)),
|
||||||
@@ -604,7 +604,7 @@ class ProfileEditPage extends HookConsumerWidget {
|
|||||||
context.pop();
|
context.pop();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
icon: const Icon(Icons.save, size: 20),
|
icon: const FaIcon(FontAwesomeIcons.floppyDisk, size: 18),
|
||||||
label: const Text(
|
label: const Text(
|
||||||
'Lưu thay đổi',
|
'Lưu thay đổi',
|
||||||
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600),
|
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600),
|
||||||
@@ -641,12 +641,12 @@ class ProfileEditPage extends HookConsumerWidget {
|
|||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
ListTile(
|
ListTile(
|
||||||
leading: const Icon(Icons.camera_alt),
|
leading: const FaIcon(FontAwesomeIcons.camera, size: 18),
|
||||||
title: const Text('Máy ảnh'),
|
title: const Text('Máy ảnh'),
|
||||||
onTap: () => Navigator.pop(context, ImageSource.camera),
|
onTap: () => Navigator.pop(context, ImageSource.camera),
|
||||||
),
|
),
|
||||||
ListTile(
|
ListTile(
|
||||||
leading: const Icon(Icons.photo_library),
|
leading: const FaIcon(FontAwesomeIcons.images, size: 18),
|
||||||
title: const Text('Thư viện ảnh'),
|
title: const Text('Thư viện ảnh'),
|
||||||
onTap: () => Navigator.pop(context, ImageSource.gallery),
|
onTap: () => Navigator.pop(context, ImageSource.gallery),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
library;
|
library;
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
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/constants/ui_constants.dart';
|
||||||
import 'package:worker/core/theme/colors.dart';
|
import 'package:worker/core/theme/colors.dart';
|
||||||
|
|
||||||
@@ -74,9 +75,9 @@ class AccountMenuItem extends StatelessWidget {
|
|||||||
AppColors.lightBlue.withValues(alpha: 0.1),
|
AppColors.lightBlue.withValues(alpha: 0.1),
|
||||||
shape: BoxShape.circle,
|
shape: BoxShape.circle,
|
||||||
),
|
),
|
||||||
child: Icon(
|
child: FaIcon(
|
||||||
icon,
|
icon,
|
||||||
size: 20,
|
size: 18,
|
||||||
color: iconColor ?? AppColors.primaryBlue,
|
color: iconColor ?? AppColors.primaryBlue,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -111,9 +112,9 @@ class AccountMenuItem extends StatelessWidget {
|
|||||||
|
|
||||||
// Trailing widget (default: chevron)
|
// Trailing widget (default: chevron)
|
||||||
trailing ??
|
trailing ??
|
||||||
const Icon(
|
const FaIcon(
|
||||||
Icons.chevron_right,
|
FontAwesomeIcons.chevronRight,
|
||||||
size: 20,
|
size: 18,
|
||||||
color: AppColors.grey500,
|
color: AppColors.grey500,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
library;
|
library;
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
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/constants/ui_constants.dart';
|
||||||
import 'package:worker/core/theme/colors.dart';
|
import 'package:worker/core/theme/colors.dart';
|
||||||
|
|
||||||
@@ -156,9 +157,9 @@ class AddressCard extends StatelessWidget {
|
|||||||
border: Border.all(color: const Color(0xFFE2E8F0)),
|
border: Border.all(color: const Color(0xFFE2E8F0)),
|
||||||
borderRadius: BorderRadius.circular(8),
|
borderRadius: BorderRadius.circular(8),
|
||||||
),
|
),
|
||||||
child: const Icon(
|
child: const FaIcon(
|
||||||
Icons.edit,
|
FontAwesomeIcons.penToSquare,
|
||||||
size: 18,
|
size: 16,
|
||||||
color: AppColors.primaryBlue,
|
color: AppColors.primaryBlue,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -178,9 +179,9 @@ class AddressCard extends StatelessWidget {
|
|||||||
border: Border.all(color: const Color(0xFFE2E8F0)),
|
border: Border.all(color: const Color(0xFFE2E8F0)),
|
||||||
borderRadius: BorderRadius.circular(8),
|
borderRadius: BorderRadius.circular(8),
|
||||||
),
|
),
|
||||||
child: const Icon(
|
child: const FaIcon(
|
||||||
Icons.delete,
|
FontAwesomeIcons.trashCan,
|
||||||
size: 18,
|
size: 16,
|
||||||
color: AppColors.danger,
|
color: AppColors.danger,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -194,8 +194,8 @@ class NotificationsPage extends HookConsumerWidget {
|
|||||||
child: Column(
|
child: Column(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Icon(
|
FaIcon(
|
||||||
Icons.notifications_none,
|
FontAwesomeIcons.bell,
|
||||||
size: 64,
|
size: 64,
|
||||||
color: AppColors.grey500.withValues(alpha: 0.5),
|
color: AppColors.grey500.withValues(alpha: 0.5),
|
||||||
),
|
),
|
||||||
@@ -227,8 +227,8 @@ class NotificationsPage extends HookConsumerWidget {
|
|||||||
child: Column(
|
child: Column(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Icon(
|
FaIcon(
|
||||||
Icons.error_outline,
|
FontAwesomeIcons.circleExclamation,
|
||||||
size: 64,
|
size: 64,
|
||||||
color: AppColors.danger.withValues(alpha: 0.5),
|
color: AppColors.danger.withValues(alpha: 0.5),
|
||||||
),
|
),
|
||||||
@@ -248,7 +248,7 @@ class NotificationsPage extends HookConsumerWidget {
|
|||||||
filteredNotificationsProvider(selectedCategory.value),
|
filteredNotificationsProvider(selectedCategory.value),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
icon: const Icon(Icons.refresh),
|
icon: const FaIcon(FontAwesomeIcons.arrowsRotate, size: 18),
|
||||||
label: const Text('Thử lại'),
|
label: const Text('Thử lại'),
|
||||||
style: ElevatedButton.styleFrom(
|
style: ElevatedButton.styleFrom(
|
||||||
backgroundColor: AppColors.primaryBlue,
|
backgroundColor: AppColors.primaryBlue,
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
library;
|
library;
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
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/constants/ui_constants.dart';
|
||||||
import 'package:worker/core/theme/colors.dart';
|
import 'package:worker/core/theme/colors.dart';
|
||||||
import 'package:worker/features/notifications/domain/entities/notification.dart'
|
import 'package:worker/features/notifications/domain/entities/notification.dart'
|
||||||
@@ -62,7 +63,7 @@ class NotificationCard extends StatelessWidget {
|
|||||||
Row(
|
Row(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Icon(_getIcon(), size: 18, color: _getIconColor()),
|
FaIcon(_getIcon(), size: 16, color: _getIconColor()),
|
||||||
const SizedBox(width: 8),
|
const SizedBox(width: 8),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Text(
|
child: Text(
|
||||||
@@ -119,21 +120,21 @@ class NotificationCard extends StatelessWidget {
|
|||||||
final type = notification.type.toLowerCase();
|
final type = notification.type.toLowerCase();
|
||||||
|
|
||||||
if (type.contains('points') || type.contains('loyalty')) {
|
if (type.contains('points') || type.contains('loyalty')) {
|
||||||
return Icons.card_giftcard;
|
return FontAwesomeIcons.gift;
|
||||||
} else if (type.contains('promotion') || type.contains('sale')) {
|
} else if (type.contains('promotion') || type.contains('sale')) {
|
||||||
return Icons.local_offer;
|
return FontAwesomeIcons.tag;
|
||||||
} else if (type.contains('shipping')) {
|
} else if (type.contains('shipping')) {
|
||||||
return Icons.local_shipping;
|
return FontAwesomeIcons.truck;
|
||||||
} else if (type.contains('tier') || type.contains('upgrade')) {
|
} else if (type.contains('tier') || type.contains('upgrade')) {
|
||||||
return Icons.workspace_premium;
|
return FontAwesomeIcons.crown;
|
||||||
} else if (type.contains('event')) {
|
} else if (type.contains('event')) {
|
||||||
return Icons.event;
|
return FontAwesomeIcons.calendarDays;
|
||||||
} else if (type.contains('confirmed')) {
|
} else if (type.contains('confirmed')) {
|
||||||
return Icons.check_circle;
|
return FontAwesomeIcons.solidCircleCheck;
|
||||||
} else if (type.contains('birthday')) {
|
} else if (type.contains('birthday')) {
|
||||||
return Icons.cake;
|
return FontAwesomeIcons.cakeCandles;
|
||||||
} else {
|
} else {
|
||||||
return Icons.notifications;
|
return FontAwesomeIcons.bell;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
library;
|
library;
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
||||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||||
import 'package:go_router/go_router.dart';
|
import 'package:go_router/go_router.dart';
|
||||||
import 'package:intl/intl.dart';
|
import 'package:intl/intl.dart';
|
||||||
@@ -34,7 +35,7 @@ class OrderDetailPage extends ConsumerWidget {
|
|||||||
backgroundColor: const Color(0xFFF4F6F8),
|
backgroundColor: const Color(0xFFF4F6F8),
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
leading: IconButton(
|
leading: IconButton(
|
||||||
icon: const Icon(Icons.arrow_back, color: Colors.black),
|
icon: const FaIcon(FontAwesomeIcons.arrowLeft, color: Colors.black, size: 20),
|
||||||
onPressed: () => context.pop(),
|
onPressed: () => context.pop(),
|
||||||
),
|
),
|
||||||
title: const Text(
|
title: const Text(
|
||||||
@@ -43,7 +44,7 @@ class OrderDetailPage extends ConsumerWidget {
|
|||||||
),
|
),
|
||||||
actions: [
|
actions: [
|
||||||
IconButton(
|
IconButton(
|
||||||
icon: const Icon(Icons.share, color: Colors.black),
|
icon: const FaIcon(FontAwesomeIcons.shareNodes, color: Colors.black, size: 20),
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
// TODO: Implement share functionality
|
// TODO: Implement share functionality
|
||||||
ScaffoldMessenger.of(context).showSnackBar(
|
ScaffoldMessenger.of(context).showSnackBar(
|
||||||
@@ -54,7 +55,7 @@ class OrderDetailPage extends ConsumerWidget {
|
|||||||
},
|
},
|
||||||
),
|
),
|
||||||
IconButton(
|
IconButton(
|
||||||
icon: const Icon(Icons.print, color: Colors.black),
|
icon: const FaIcon(FontAwesomeIcons.print, color: Colors.black, size: 20),
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
// TODO: Implement print functionality
|
// TODO: Implement print functionality
|
||||||
ScaffoldMessenger.of(context).showSnackBar(
|
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'),
|
label: const Text('Liên hệ khách hàng'),
|
||||||
style: OutlinedButton.styleFrom(
|
style: OutlinedButton.styleFrom(
|
||||||
padding: const EdgeInsets.symmetric(vertical: 12),
|
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'),
|
label: const Text('Cập nhật trạng thái'),
|
||||||
style: ElevatedButton.styleFrom(
|
style: ElevatedButton.styleFrom(
|
||||||
padding: const EdgeInsets.symmetric(vertical: 12),
|
padding: const EdgeInsets.symmetric(vertical: 12),
|
||||||
@@ -259,12 +260,12 @@ class OrderDetailPage extends ConsumerWidget {
|
|||||||
case 'completed':
|
case 'completed':
|
||||||
iconColor = Colors.white;
|
iconColor = Colors.white;
|
||||||
iconBgColor = AppColors.success;
|
iconBgColor = AppColors.success;
|
||||||
iconData = Icons.check;
|
iconData = FontAwesomeIcons.check;
|
||||||
break;
|
break;
|
||||||
case 'active':
|
case 'active':
|
||||||
iconColor = Colors.white;
|
iconColor = Colors.white;
|
||||||
iconBgColor = AppColors.warning;
|
iconBgColor = AppColors.warning;
|
||||||
iconData = Icons.settings;
|
iconData = FontAwesomeIcons.gear;
|
||||||
break;
|
break;
|
||||||
default: // pending
|
default: // pending
|
||||||
iconColor = AppColors.grey500;
|
iconColor = AppColors.grey500;
|
||||||
@@ -285,7 +286,7 @@ class OrderDetailPage extends ConsumerWidget {
|
|||||||
color: iconBgColor,
|
color: iconBgColor,
|
||||||
shape: BoxShape.circle,
|
shape: BoxShape.circle,
|
||||||
),
|
),
|
||||||
child: Icon(iconData, size: 12, color: iconColor),
|
child: FaIcon(iconData, size: 10, color: iconColor),
|
||||||
),
|
),
|
||||||
if (!isLast)
|
if (!isLast)
|
||||||
Container(
|
Container(
|
||||||
@@ -333,11 +334,11 @@ class OrderDetailPage extends ConsumerWidget {
|
|||||||
/// Get icon for timeline title
|
/// Get icon for timeline title
|
||||||
IconData _getIconForTitle(String title) {
|
IconData _getIconForTitle(String title) {
|
||||||
if (title.contains('Vận chuyển')) {
|
if (title.contains('Vận chuyển')) {
|
||||||
return Icons.local_shipping;
|
return FontAwesomeIcons.truck;
|
||||||
} else if (title.contains('Giao hàng')) {
|
} else if (title.contains('Giao hàng')) {
|
||||||
return Icons.inventory_2;
|
return FontAwesomeIcons.box;
|
||||||
}
|
}
|
||||||
return Icons.circle;
|
return FontAwesomeIcons.solidCircle;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Build Status Badge
|
/// Build Status Badge
|
||||||
@@ -433,10 +434,10 @@ class OrderDetailPage extends ConsumerWidget {
|
|||||||
children: [
|
children: [
|
||||||
Row(
|
Row(
|
||||||
children: [
|
children: [
|
||||||
const Icon(
|
const FaIcon(
|
||||||
Icons.local_shipping,
|
FontAwesomeIcons.truck,
|
||||||
color: AppColors.primaryBlue,
|
color: AppColors.primaryBlue,
|
||||||
size: 20,
|
size: 18,
|
||||||
),
|
),
|
||||||
const SizedBox(width: 8),
|
const SizedBox(width: 8),
|
||||||
const Text(
|
const Text(
|
||||||
@@ -468,10 +469,10 @@ class OrderDetailPage extends ConsumerWidget {
|
|||||||
color: AppColors.primaryBlue,
|
color: AppColors.primaryBlue,
|
||||||
borderRadius: BorderRadius.circular(8),
|
borderRadius: BorderRadius.circular(8),
|
||||||
),
|
),
|
||||||
child: const Icon(
|
child: const FaIcon(
|
||||||
Icons.local_shipping,
|
FontAwesomeIcons.truck,
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
size: 20,
|
size: 18,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(width: 12),
|
const SizedBox(width: 12),
|
||||||
@@ -506,7 +507,7 @@ class OrderDetailPage extends ConsumerWidget {
|
|||||||
|
|
||||||
// Delivery Details
|
// Delivery Details
|
||||||
_buildInfoRow(
|
_buildInfoRow(
|
||||||
icon: Icons.calendar_today,
|
icon: FontAwesomeIcons.calendar,
|
||||||
label: 'Ngày xuất kho',
|
label: 'Ngày xuất kho',
|
||||||
value: dateFormatter.format(warehouseDate),
|
value: dateFormatter.format(warehouseDate),
|
||||||
valueColor: AppColors.success,
|
valueColor: AppColors.success,
|
||||||
@@ -515,7 +516,7 @@ class OrderDetailPage extends ConsumerWidget {
|
|||||||
const SizedBox(height: 12),
|
const SizedBox(height: 12),
|
||||||
|
|
||||||
_buildInfoRow(
|
_buildInfoRow(
|
||||||
icon: Icons.access_time,
|
icon: FontAwesomeIcons.clock,
|
||||||
label: 'Thời gian giao hàng',
|
label: 'Thời gian giao hàng',
|
||||||
value: '${dateFormatter.format(deliveryDate)}, 8:00 - 17:00',
|
value: '${dateFormatter.format(deliveryDate)}, 8:00 - 17:00',
|
||||||
),
|
),
|
||||||
@@ -523,7 +524,7 @@ class OrderDetailPage extends ConsumerWidget {
|
|||||||
const SizedBox(height: 12),
|
const SizedBox(height: 12),
|
||||||
|
|
||||||
_buildInfoRow(
|
_buildInfoRow(
|
||||||
icon: Icons.location_on,
|
icon: FontAwesomeIcons.locationDot,
|
||||||
label: 'Địa chỉ giao hàng',
|
label: 'Địa chỉ giao hàng',
|
||||||
value: deliveryAddress,
|
value: deliveryAddress,
|
||||||
),
|
),
|
||||||
@@ -531,7 +532,7 @@ class OrderDetailPage extends ConsumerWidget {
|
|||||||
const SizedBox(height: 12),
|
const SizedBox(height: 12),
|
||||||
|
|
||||||
_buildInfoRow(
|
_buildInfoRow(
|
||||||
icon: Icons.person,
|
icon: FontAwesomeIcons.user,
|
||||||
label: 'Người nhận',
|
label: 'Người nhận',
|
||||||
value: '$receiverName - $receiverPhone',
|
value: '$receiverName - $receiverPhone',
|
||||||
),
|
),
|
||||||
@@ -555,7 +556,7 @@ class OrderDetailPage extends ConsumerWidget {
|
|||||||
flex: 2,
|
flex: 2,
|
||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
Icon(icon, size: 16, color: AppColors.grey500),
|
FaIcon(icon, size: 14, color: AppColors.grey500),
|
||||||
const SizedBox(width: 6),
|
const SizedBox(width: 6),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Text(
|
child: Text(
|
||||||
@@ -606,10 +607,10 @@ class OrderDetailPage extends ConsumerWidget {
|
|||||||
children: [
|
children: [
|
||||||
Row(
|
Row(
|
||||||
children: [
|
children: [
|
||||||
const Icon(
|
const FaIcon(
|
||||||
Icons.person_outline,
|
FontAwesomeIcons.user,
|
||||||
color: AppColors.primaryBlue,
|
color: AppColors.primaryBlue,
|
||||||
size: 20,
|
size: 18,
|
||||||
),
|
),
|
||||||
const SizedBox(width: 8),
|
const SizedBox(width: 8),
|
||||||
const Text(
|
const Text(
|
||||||
@@ -724,10 +725,10 @@ class OrderDetailPage extends ConsumerWidget {
|
|||||||
children: [
|
children: [
|
||||||
Row(
|
Row(
|
||||||
children: [
|
children: [
|
||||||
const Icon(
|
const FaIcon(
|
||||||
Icons.inventory_2,
|
FontAwesomeIcons.box,
|
||||||
color: AppColors.primaryBlue,
|
color: AppColors.primaryBlue,
|
||||||
size: 20,
|
size: 18,
|
||||||
),
|
),
|
||||||
const SizedBox(width: 8),
|
const SizedBox(width: 8),
|
||||||
const Text(
|
const Text(
|
||||||
@@ -762,10 +763,10 @@ class OrderDetailPage extends ConsumerWidget {
|
|||||||
color: AppColors.grey50,
|
color: AppColors.grey50,
|
||||||
borderRadius: BorderRadius.circular(6),
|
borderRadius: BorderRadius.circular(6),
|
||||||
),
|
),
|
||||||
child: const Icon(
|
child: const FaIcon(
|
||||||
Icons.image,
|
FontAwesomeIcons.image,
|
||||||
color: AppColors.grey500,
|
color: AppColors.grey500,
|
||||||
size: 30,
|
size: 28,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
||||||
@@ -884,10 +885,10 @@ class OrderDetailPage extends ConsumerWidget {
|
|||||||
children: [
|
children: [
|
||||||
Row(
|
Row(
|
||||||
children: [
|
children: [
|
||||||
const Icon(
|
const FaIcon(
|
||||||
Icons.receipt_long,
|
FontAwesomeIcons.receipt,
|
||||||
color: AppColors.primaryBlue,
|
color: AppColors.primaryBlue,
|
||||||
size: 20,
|
size: 18,
|
||||||
),
|
),
|
||||||
const SizedBox(width: 8),
|
const SizedBox(width: 8),
|
||||||
const Text(
|
const Text(
|
||||||
@@ -934,9 +935,9 @@ class OrderDetailPage extends ConsumerWidget {
|
|||||||
// Payment Method
|
// Payment Method
|
||||||
Row(
|
Row(
|
||||||
children: [
|
children: [
|
||||||
const Icon(
|
const FaIcon(
|
||||||
Icons.credit_card,
|
FontAwesomeIcons.creditCard,
|
||||||
size: 16,
|
size: 14,
|
||||||
color: AppColors.grey500,
|
color: AppColors.grey500,
|
||||||
),
|
),
|
||||||
const SizedBox(width: 6),
|
const SizedBox(width: 6),
|
||||||
@@ -962,7 +963,7 @@ class OrderDetailPage extends ConsumerWidget {
|
|||||||
// Order Notes
|
// Order Notes
|
||||||
Row(
|
Row(
|
||||||
children: [
|
children: [
|
||||||
const Icon(Icons.note, size: 16, color: AppColors.grey500),
|
const FaIcon(FontAwesomeIcons.noteSticky, size: 14, color: AppColors.grey500),
|
||||||
const SizedBox(width: 6),
|
const SizedBox(width: 6),
|
||||||
const Text(
|
const Text(
|
||||||
'Ghi chú đơn hàng:',
|
'Ghi chú đơn hàng:',
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
library;
|
library;
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
||||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||||
import 'package:go_router/go_router.dart';
|
import 'package:go_router/go_router.dart';
|
||||||
import 'package:intl/intl.dart';
|
import 'package:intl/intl.dart';
|
||||||
@@ -34,7 +35,7 @@ class PaymentDetailPage extends ConsumerWidget {
|
|||||||
backgroundColor: const Color(0xFFF4F6F8),
|
backgroundColor: const Color(0xFFF4F6F8),
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
leading: IconButton(
|
leading: IconButton(
|
||||||
icon: const Icon(Icons.arrow_back, color: Colors.black),
|
icon: const FaIcon(FontAwesomeIcons.arrowLeft, color: Colors.black, size: 20),
|
||||||
onPressed: () => context.pop(),
|
onPressed: () => context.pop(),
|
||||||
),
|
),
|
||||||
title: const Text(
|
title: const Text(
|
||||||
@@ -47,7 +48,7 @@ class PaymentDetailPage extends ConsumerWidget {
|
|||||||
centerTitle: false,
|
centerTitle: false,
|
||||||
actions: [
|
actions: [
|
||||||
IconButton(
|
IconButton(
|
||||||
icon: const Icon(Icons.share, color: Colors.black),
|
icon: const FaIcon(FontAwesomeIcons.shareNodes, color: Colors.black, size: 20),
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
// TODO: Implement share functionality
|
// TODO: Implement share functionality
|
||||||
ScaffoldMessenger.of(
|
ScaffoldMessenger.of(
|
||||||
@@ -128,7 +129,7 @@ class PaymentDetailPage extends ConsumerWidget {
|
|||||||
const SnackBar(content: Text('Liên hệ hỗ trợ')),
|
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ợ'),
|
label: const Text('Liên hệ hỗ trợ'),
|
||||||
style: OutlinedButton.styleFrom(
|
style: OutlinedButton.styleFrom(
|
||||||
padding: const EdgeInsets.symmetric(
|
padding: const EdgeInsets.symmetric(
|
||||||
@@ -165,10 +166,11 @@ class PaymentDetailPage extends ConsumerWidget {
|
|||||||
),
|
),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
icon: Icon(
|
icon: FaIcon(
|
||||||
(invoice.status == InvoiceStatus.paid || invoice.isPaid)
|
(invoice.status == InvoiceStatus.paid || invoice.isPaid)
|
||||||
? Icons.check_circle
|
? FontAwesomeIcons.solidCircleCheck
|
||||||
: Icons.credit_card,
|
: FontAwesomeIcons.creditCard,
|
||||||
|
size: 18,
|
||||||
),
|
),
|
||||||
label: Text(
|
label: Text(
|
||||||
(invoice.status == InvoiceStatus.paid || invoice.isPaid)
|
(invoice.status == InvoiceStatus.paid || invoice.isPaid)
|
||||||
@@ -203,8 +205,8 @@ class PaymentDetailPage extends ConsumerWidget {
|
|||||||
child: Column(
|
child: Column(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
const Icon(
|
const FaIcon(
|
||||||
Icons.error_outline,
|
FontAwesomeIcons.circleExclamation,
|
||||||
size: 64,
|
size: 64,
|
||||||
color: AppColors.danger,
|
color: AppColors.danger,
|
||||||
),
|
),
|
||||||
@@ -456,7 +458,7 @@ class PaymentDetailPage extends ConsumerWidget {
|
|||||||
children: [
|
children: [
|
||||||
Row(
|
Row(
|
||||||
children: [
|
children: [
|
||||||
Icon(Icons.inventory_2, color: AppColors.primaryBlue, size: 20),
|
FaIcon(FontAwesomeIcons.box, color: AppColors.primaryBlue, size: 18),
|
||||||
const SizedBox(width: 8),
|
const SizedBox(width: 8),
|
||||||
const Text(
|
const Text(
|
||||||
'Danh sách sản phẩm',
|
'Danh sách sản phẩm',
|
||||||
@@ -490,10 +492,10 @@ class PaymentDetailPage extends ConsumerWidget {
|
|||||||
color: AppColors.grey50,
|
color: AppColors.grey50,
|
||||||
borderRadius: BorderRadius.circular(8),
|
borderRadius: BorderRadius.circular(8),
|
||||||
),
|
),
|
||||||
child: const Icon(
|
child: const FaIcon(
|
||||||
Icons.image,
|
FontAwesomeIcons.image,
|
||||||
color: AppColors.grey500,
|
color: AppColors.grey500,
|
||||||
size: 24,
|
size: 22,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(width: 16),
|
const SizedBox(width: 16),
|
||||||
@@ -572,7 +574,7 @@ class PaymentDetailPage extends ConsumerWidget {
|
|||||||
children: [
|
children: [
|
||||||
Row(
|
Row(
|
||||||
children: [
|
children: [
|
||||||
Icon(Icons.history, color: AppColors.primaryBlue, size: 20),
|
FaIcon(FontAwesomeIcons.clockRotateLeft, color: AppColors.primaryBlue, size: 18),
|
||||||
const SizedBox(width: 8),
|
const SizedBox(width: 8),
|
||||||
const Text(
|
const Text(
|
||||||
'Lịch sử thanh toán',
|
'Lịch sử thanh toán',
|
||||||
@@ -602,10 +604,10 @@ class PaymentDetailPage extends ConsumerWidget {
|
|||||||
color: AppColors.success.withValues(alpha: 0.1),
|
color: AppColors.success.withValues(alpha: 0.1),
|
||||||
shape: BoxShape.circle,
|
shape: BoxShape.circle,
|
||||||
),
|
),
|
||||||
child: const Icon(
|
child: const FaIcon(
|
||||||
Icons.check,
|
FontAwesomeIcons.check,
|
||||||
color: AppColors.success,
|
color: AppColors.success,
|
||||||
size: 20,
|
size: 18,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(width: 16),
|
const SizedBox(width: 16),
|
||||||
@@ -657,8 +659,8 @@ class PaymentDetailPage extends ConsumerWidget {
|
|||||||
padding: const EdgeInsets.symmetric(vertical: 20),
|
padding: const EdgeInsets.symmetric(vertical: 20),
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
Icon(
|
FaIcon(
|
||||||
Icons.receipt_long_outlined,
|
FontAwesomeIcons.receipt,
|
||||||
size: 48,
|
size: 48,
|
||||||
color: AppColors.grey100,
|
color: AppColors.grey100,
|
||||||
),
|
),
|
||||||
@@ -701,7 +703,7 @@ class PaymentDetailPage extends ConsumerWidget {
|
|||||||
children: [
|
children: [
|
||||||
const Row(
|
const Row(
|
||||||
children: [
|
children: [
|
||||||
Icon(Icons.download, color: AppColors.primaryBlue, size: 20),
|
FaIcon(FontAwesomeIcons.download, color: AppColors.primaryBlue, size: 18),
|
||||||
SizedBox(width: 8),
|
SizedBox(width: 8),
|
||||||
Text(
|
Text(
|
||||||
'Tải chứng từ',
|
'Tải chứng từ',
|
||||||
@@ -715,7 +717,7 @@ class PaymentDetailPage extends ConsumerWidget {
|
|||||||
),
|
),
|
||||||
const SizedBox(height: 16),
|
const SizedBox(height: 16),
|
||||||
_buildDownloadButton(
|
_buildDownloadButton(
|
||||||
icon: Icons.picture_as_pdf,
|
icon: FontAwesomeIcons.filePdf,
|
||||||
label: 'Hóa đơn PDF',
|
label: 'Hóa đơn PDF',
|
||||||
onTap: () {
|
onTap: () {
|
||||||
// TODO: Download invoice PDF
|
// TODO: Download invoice PDF
|
||||||
@@ -723,7 +725,7 @@ class PaymentDetailPage extends ConsumerWidget {
|
|||||||
),
|
),
|
||||||
const SizedBox(height: 12),
|
const SizedBox(height: 12),
|
||||||
_buildDownloadButton(
|
_buildDownloadButton(
|
||||||
icon: Icons.receipt,
|
icon: FontAwesomeIcons.receipt,
|
||||||
label: 'Phiếu thu PDF',
|
label: 'Phiếu thu PDF',
|
||||||
onTap: () {
|
onTap: () {
|
||||||
// TODO: Download receipt PDF
|
// TODO: Download receipt PDF
|
||||||
@@ -754,7 +756,7 @@ class PaymentDetailPage extends ConsumerWidget {
|
|||||||
child: Row(
|
child: Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Icon(icon, size: 20, color: AppColors.grey500),
|
FaIcon(icon, size: 18, color: AppColors.grey500),
|
||||||
const SizedBox(width: 8),
|
const SizedBox(width: 8),
|
||||||
Flexible(
|
Flexible(
|
||||||
child: Text(
|
child: Text(
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ import 'dart:async';
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
import 'package:flutter_hooks/flutter_hooks.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:go_router/go_router.dart';
|
||||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||||
|
|
||||||
@@ -62,7 +63,7 @@ class PaymentQrPage extends HookConsumerWidget {
|
|||||||
backgroundColor: Colors.white,
|
backgroundColor: Colors.white,
|
||||||
elevation: 0,
|
elevation: 0,
|
||||||
leading: IconButton(
|
leading: IconButton(
|
||||||
icon: const Icon(Icons.arrow_back, color: Colors.black),
|
icon: const FaIcon(FontAwesomeIcons.arrowLeft, color: Colors.black, size: 20),
|
||||||
onPressed: () => context.pop(),
|
onPressed: () => context.pop(),
|
||||||
),
|
),
|
||||||
title: const Text(
|
title: const Text(
|
||||||
@@ -76,7 +77,7 @@ class PaymentQrPage extends HookConsumerWidget {
|
|||||||
centerTitle: false,
|
centerTitle: false,
|
||||||
actions: [
|
actions: [
|
||||||
IconButton(
|
IconButton(
|
||||||
icon: const Icon(Icons.info_outline, color: Colors.black),
|
icon: const FaIcon(FontAwesomeIcons.circleInfo, color: Colors.black, size: 20),
|
||||||
onPressed: () => _showInfoDialog(context),
|
onPressed: () => _showInfoDialog(context),
|
||||||
),
|
),
|
||||||
const SizedBox(width: AppSpacing.sm),
|
const SizedBox(width: AppSpacing.sm),
|
||||||
@@ -158,7 +159,7 @@ class PaymentQrPage extends HookConsumerWidget {
|
|||||||
),
|
),
|
||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
const Icon(Icons.info, color: AppColors.warning, size: 20),
|
const FaIcon(FontAwesomeIcons.circleInfo, color: AppColors.warning, size: 18),
|
||||||
const SizedBox(width: 8),
|
const SizedBox(width: 8),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Text(
|
child: Text(
|
||||||
@@ -228,7 +229,7 @@ class PaymentQrPage extends HookConsumerWidget {
|
|||||||
return const Column(
|
return const Column(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Icon(Icons.qr_code, size: 80, color: AppColors.grey500),
|
FaIcon(FontAwesomeIcons.qrcode, size: 80, color: AppColors.grey500),
|
||||||
SizedBox(height: 8),
|
SizedBox(height: 8),
|
||||||
Text(
|
Text(
|
||||||
'Không thể tải mã QR',
|
'Không thể tải mã QR',
|
||||||
@@ -322,10 +323,10 @@ class PaymentQrPage extends HookConsumerWidget {
|
|||||||
child: Row(
|
child: Row(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
const Icon(
|
const FaIcon(
|
||||||
Icons.lightbulb_outline,
|
FontAwesomeIcons.lightbulb,
|
||||||
color: AppColors.primaryBlue,
|
color: AppColors.primaryBlue,
|
||||||
size: 20,
|
size: 18,
|
||||||
),
|
),
|
||||||
const SizedBox(width: 8),
|
const SizedBox(width: 8),
|
||||||
Expanded(
|
Expanded(
|
||||||
@@ -384,7 +385,7 @@ class PaymentQrPage extends HookConsumerWidget {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
IconButton(
|
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),
|
onPressed: () => _copyToClipboard(context, value),
|
||||||
padding: EdgeInsets.zero,
|
padding: EdgeInsets.zero,
|
||||||
constraints: const BoxConstraints(),
|
constraints: const BoxConstraints(),
|
||||||
@@ -403,7 +404,7 @@ class PaymentQrPage extends HookConsumerWidget {
|
|||||||
Expanded(
|
Expanded(
|
||||||
child: OutlinedButton.icon(
|
child: OutlinedButton.icon(
|
||||||
onPressed: () => _confirmPayment(context),
|
onPressed: () => _confirmPayment(context),
|
||||||
icon: const Icon(Icons.check, size: 20),
|
icon: const FaIcon(FontAwesomeIcons.check, size: 18),
|
||||||
label: const Text(
|
label: const Text(
|
||||||
'Đã thanh toán',
|
'Đã thanh toán',
|
||||||
style: TextStyle(fontSize: 15, fontWeight: FontWeight.w600),
|
style: TextStyle(fontSize: 15, fontWeight: FontWeight.w600),
|
||||||
@@ -427,7 +428,7 @@ class PaymentQrPage extends HookConsumerWidget {
|
|||||||
Expanded(
|
Expanded(
|
||||||
child: ElevatedButton.icon(
|
child: ElevatedButton.icon(
|
||||||
onPressed: () => _uploadProof(context),
|
onPressed: () => _uploadProof(context),
|
||||||
icon: const Icon(Icons.camera_alt, size: 20),
|
icon: const FaIcon(FontAwesomeIcons.camera, size: 18),
|
||||||
label: const Text(
|
label: const Text(
|
||||||
'Upload bill',
|
'Upload bill',
|
||||||
style: TextStyle(fontSize: 15, fontWeight: FontWeight.w600),
|
style: TextStyle(fontSize: 15, fontWeight: FontWeight.w600),
|
||||||
@@ -460,7 +461,7 @@ class PaymentQrPage extends HookConsumerWidget {
|
|||||||
child: Row(
|
child: Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
const Icon(Icons.schedule, size: 18, color: AppColors.grey500),
|
const FaIcon(FontAwesomeIcons.clock, size: 16, color: AppColors.grey500),
|
||||||
const SizedBox(width: 8),
|
const SizedBox(width: 8),
|
||||||
const Text(
|
const Text(
|
||||||
'Thời gian thanh toán: ',
|
'Thời gian thanh toán: ',
|
||||||
|
|||||||
Reference in New Issue
Block a user