update icon

This commit is contained in:
Phuoc Nguyen
2025-11-14 18:02:37 +07:00
parent aae3c9d080
commit b5f90c364d
54 changed files with 534 additions and 245 deletions

View File

@@ -11,6 +11,7 @@ library;
import 'package:cached_network_image/cached_network_image.dart';
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'package:go_router/go_router.dart';
import 'package:worker/core/constants/ui_constants.dart';
import 'package:worker/core/router/app_router.dart';
@@ -56,7 +57,7 @@ class _PromotionDetailPageState extends ConsumerState<PromotionDetailPage> {
loading: () => Scaffold(
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(
@@ -73,7 +74,7 @@ class _PromotionDetailPageState extends ConsumerState<PromotionDetailPage> {
error: (error, stack) => Scaffold(
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(
@@ -89,8 +90,8 @@ class _PromotionDetailPageState extends ConsumerState<PromotionDetailPage> {
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
const Icon(
Icons.error_outline,
const FaIcon(
FontAwesomeIcons.circleExclamation,
size: 64,
color: AppColors.danger,
),
@@ -127,7 +128,7 @@ class _PromotionDetailPageState extends ConsumerState<PromotionDetailPage> {
foregroundColor: AppColors.grey900,
elevation: AppBarSpecs.elevation,
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(
@@ -138,15 +139,16 @@ class _PromotionDetailPageState extends ConsumerState<PromotionDetailPage> {
actions: [
// Share Button
IconButton(
icon: const Icon(Icons.share, color: Colors.black),
icon: const FaIcon(FontAwesomeIcons.shareNodes, color: Colors.black, size: 20),
onPressed: _handleShare,
),
// Bookmark Button
IconButton(
icon: Icon(
_isBookmarked ? Icons.bookmark : Icons.bookmark_border,
icon: FaIcon(
_isBookmarked ? FontAwesomeIcons.solidBookmark : FontAwesomeIcons.bookmark,
color: Colors.black,
size: 20,
),
onPressed: _handleBookmark,
),
@@ -205,8 +207,8 @@ class _PromotionDetailPageState extends ConsumerState<PromotionDetailPage> {
height: 200,
color: AppColors.grey100,
child: const Center(
child: Icon(
Icons.image_not_supported,
child: FaIcon(
FontAwesomeIcons.image,
size: 64,
color: AppColors.grey500,
),
@@ -243,9 +245,9 @@ class _PromotionDetailPageState extends ConsumerState<PromotionDetailPage> {
crossAxisAlignment: WrapCrossAlignment.center,
children: [
// Clock icon and date
const Icon(
Icons.access_time,
size: 18,
const FaIcon(
FontAwesomeIcons.clock,
size: 16,
color: Color(0xFFF59E0B), // warning color
),
Text(
@@ -270,8 +272,8 @@ class _PromotionDetailPageState extends ConsumerState<PromotionDetailPage> {
child: const Row(
mainAxisSize: MainAxisSize.min,
children: [
Icon(
Icons.local_fire_department,
FaIcon(
FontAwesomeIcons.fire,
size: 14,
color: Colors.white,
),
@@ -298,7 +300,7 @@ class _PromotionDetailPageState extends ConsumerState<PromotionDetailPage> {
Widget _buildProgramContentSection() {
return const PromotionSection(
title: 'Nội dung chương trình',
icon: Icons.card_giftcard,
icon: FontAwesomeIcons.gift,
content: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
@@ -345,7 +347,7 @@ class _PromotionDetailPageState extends ConsumerState<PromotionDetailPage> {
Widget _buildTermsSection() {
return const PromotionSection(
title: 'Điều kiện áp dụng',
icon: Icons.description,
icon: FontAwesomeIcons.fileLines,
content: PromotionBulletList(
items: [
'Áp dụng cho tất cả khách hàng là thợ xây dựng đã đăng ký tài khoản',
@@ -365,7 +367,7 @@ class _PromotionDetailPageState extends ConsumerState<PromotionDetailPage> {
Widget _buildContactSection() {
return const PromotionSection(
title: 'Thông tin liên hệ',
icon: Icons.phone,
icon: FontAwesomeIcons.phone,
isLast: true,
content: Column(
crossAxisAlignment: CrossAxisAlignment.start,
@@ -414,7 +416,7 @@ class _PromotionDetailPageState extends ConsumerState<PromotionDetailPage> {
child: const Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Icon(Icons.visibility, size: 20),
FaIcon(FontAwesomeIcons.eye, size: 18),
SizedBox(width: 8),
Text(
'Xem sản phẩm áp dụng',