update icon
This commit is contained in:
@@ -9,6 +9,7 @@ import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_html/flutter_html.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:share_plus/share_plus.dart';
|
||||
import 'package:worker/core/constants/api_constants.dart';
|
||||
@@ -77,20 +78,21 @@ class _NewsDetailPageState extends ConsumerState<NewsDetailPage> {
|
||||
),
|
||||
centerTitle: false,
|
||||
leading: IconButton(
|
||||
icon: const Icon(Icons.arrow_back, color: Colors.black),
|
||||
icon: const FaIcon(FontAwesomeIcons.arrowLeft, color: Colors.black, size: 20),
|
||||
onPressed: () => context.pop(),
|
||||
),
|
||||
actions: [
|
||||
// Share button
|
||||
IconButton(
|
||||
icon: const Icon(Icons.share, color: Colors.black),
|
||||
icon: const FaIcon(FontAwesomeIcons.shareNodes, color: Colors.black, size: 20),
|
||||
onPressed: _onShareTap,
|
||||
),
|
||||
// Bookmark button
|
||||
IconButton(
|
||||
icon: Icon(
|
||||
_isBookmarked ? Icons.bookmark : Icons.bookmark_border,
|
||||
icon: FaIcon(
|
||||
_isBookmarked ? FontAwesomeIcons.solidBookmark : FontAwesomeIcons.bookmark,
|
||||
color: _isBookmarked ? AppColors.warning : Colors.black,
|
||||
size: 20,
|
||||
),
|
||||
onPressed: _onBookmarkTap,
|
||||
),
|
||||
@@ -126,8 +128,8 @@ class _NewsDetailPageState extends ConsumerState<NewsDetailPage> {
|
||||
errorWidget: (context, url, error) => Container(
|
||||
height: 250,
|
||||
color: AppColors.grey100,
|
||||
child: const Icon(
|
||||
Icons.image_outlined,
|
||||
child: const FaIcon(
|
||||
FontAwesomeIcons.image,
|
||||
size: 48,
|
||||
color: AppColors.grey500,
|
||||
),
|
||||
@@ -276,7 +278,7 @@ class _NewsDetailPageState extends ConsumerState<NewsDetailPage> {
|
||||
),
|
||||
|
||||
// Date
|
||||
_buildMetaItem(Icons.calendar_today, article.formattedDate),
|
||||
_buildMetaItem(FontAwesomeIcons.calendar, article.formattedDate),
|
||||
|
||||
// Reading time
|
||||
// _buildMetaItem(Icons.schedule, article.readingTimeText),
|
||||
@@ -295,7 +297,7 @@ class _NewsDetailPageState extends ConsumerState<NewsDetailPage> {
|
||||
return Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Icon(icon, size: 12, color: const Color(0xFF64748B)),
|
||||
FaIcon(icon, size: 12, color: const Color(0xFF64748B)),
|
||||
const SizedBox(width: 4),
|
||||
Text(
|
||||
text,
|
||||
@@ -369,18 +371,18 @@ class _NewsDetailPageState extends ConsumerState<NewsDetailPage> {
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
_buildActionButton(
|
||||
icon: _isLiked ? Icons.favorite : Icons.favorite_border,
|
||||
icon: _isLiked ? FontAwesomeIcons.solidHeart : FontAwesomeIcons.heart,
|
||||
onPressed: _onLikeTap,
|
||||
color: _isLiked ? Colors.red : null,
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
_buildActionButton(
|
||||
icon: _isBookmarked ? Icons.bookmark : Icons.bookmark_border,
|
||||
icon: _isBookmarked ? FontAwesomeIcons.solidBookmark : FontAwesomeIcons.bookmark,
|
||||
onPressed: _onBookmarkTap,
|
||||
color: _isBookmarked ? AppColors.warning : null,
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
_buildActionButton(icon: Icons.share, onPressed: _onShareTap),
|
||||
_buildActionButton(icon: FontAwesomeIcons.shareNodes, onPressed: _onShareTap),
|
||||
],
|
||||
),
|
||||
);
|
||||
@@ -414,7 +416,7 @@ class _NewsDetailPageState extends ConsumerState<NewsDetailPage> {
|
||||
side: BorderSide(color: color ?? const Color(0xFFE2E8F0), width: 2),
|
||||
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)),
|
||||
),
|
||||
child: Icon(icon, size: 20, color: color ?? const Color(0xFF64748B)),
|
||||
child: FaIcon(icon, size: 18, color: color ?? const Color(0xFF64748B)),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -458,7 +460,7 @@ class _NewsDetailPageState extends ConsumerState<NewsDetailPage> {
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Icon(Icons.article_outlined, size: 64, color: AppColors.grey500),
|
||||
FaIcon(FontAwesomeIcons.fileLines, size: 64, color: AppColors.grey500),
|
||||
const SizedBox(height: 16),
|
||||
const Text(
|
||||
'Không tìm thấy bài viết',
|
||||
@@ -490,7 +492,7 @@ class _NewsDetailPageState extends ConsumerState<NewsDetailPage> {
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Icon(Icons.error_outline, size: 64, color: AppColors.danger),
|
||||
FaIcon(FontAwesomeIcons.circleExclamation, size: 64, color: AppColors.danger),
|
||||
const SizedBox(height: 16),
|
||||
const Text(
|
||||
'Không thể tải bài viết',
|
||||
|
||||
Reference in New Issue
Block a user