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',
|
||||
|
||||
@@ -6,6 +6,7 @@ library;
|
||||
|
||||
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/theme/colors.dart';
|
||||
@@ -111,9 +112,9 @@ class _NewsListPageState extends ConsumerState<NewsListPage> {
|
||||
padding: EdgeInsets.symmetric(horizontal: AppSpacing.md),
|
||||
child: Row(
|
||||
children: [
|
||||
Icon(
|
||||
Icons.newspaper,
|
||||
size: 18,
|
||||
FaIcon(
|
||||
FontAwesomeIcons.newspaper,
|
||||
size: 16,
|
||||
color: AppColors.primaryBlue,
|
||||
),
|
||||
SizedBox(width: 8),
|
||||
@@ -194,7 +195,7 @@ class _NewsListPageState extends ConsumerState<NewsListPage> {
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Icon(Icons.newspaper_outlined, size: 64, color: AppColors.grey500),
|
||||
FaIcon(FontAwesomeIcons.newspaper, size: 64, color: AppColors.grey500),
|
||||
const SizedBox(height: 16),
|
||||
const Text(
|
||||
'Chưa có tin tức',
|
||||
@@ -221,7 +222,7 @@ class _NewsListPageState extends ConsumerState<NewsListPage> {
|
||||
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 tin tức',
|
||||
|
||||
@@ -7,6 +7,7 @@ library;
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.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/news/domain/entities/blog_category.dart';
|
||||
@@ -121,7 +122,7 @@ class CategoryFilterChips extends ConsumerWidget {
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Icon(Icons.error_outline, size: 16, color: AppColors.grey500),
|
||||
FaIcon(FontAwesomeIcons.circleExclamation, size: 16, color: AppColors.grey500),
|
||||
const SizedBox(width: AppSpacing.xs),
|
||||
Text(
|
||||
'Lỗi tải danh mục',
|
||||
@@ -133,7 +134,7 @@ class CategoryFilterChips extends ConsumerWidget {
|
||||
const SizedBox(width: AppSpacing.xs),
|
||||
GestureDetector(
|
||||
onTap: () => ref.refresh(blogCategoriesProvider),
|
||||
child: Icon(Icons.refresh, size: 16, color: AppColors.primaryBlue),
|
||||
child: FaIcon(FontAwesomeIcons.arrowsRotate, size: 14, color: AppColors.primaryBlue),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
@@ -6,6 +6,7 @@ library;
|
||||
|
||||
import 'package:cached_network_image/cached_network_image.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/theme/colors.dart';
|
||||
import 'package:worker/features/news/domain/entities/news_article.dart';
|
||||
@@ -68,8 +69,8 @@ class FeaturedNewsCard extends StatelessWidget {
|
||||
errorWidget: (context, url, error) => Container(
|
||||
height: 200,
|
||||
color: AppColors.grey100,
|
||||
child: const Icon(
|
||||
Icons.image_outlined,
|
||||
child: const FaIcon(
|
||||
FontAwesomeIcons.image,
|
||||
size: 48,
|
||||
color: AppColors.grey500,
|
||||
),
|
||||
@@ -122,7 +123,7 @@ class FeaturedNewsCard extends StatelessWidget {
|
||||
children: [
|
||||
// Date
|
||||
_buildMetaItem(
|
||||
icon: Icons.calendar_today,
|
||||
icon: FontAwesomeIcons.calendar,
|
||||
text: article.formattedDate,
|
||||
),
|
||||
|
||||
@@ -176,7 +177,7 @@ class FeaturedNewsCard extends StatelessWidget {
|
||||
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,
|
||||
|
||||
@@ -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';
|
||||
|
||||
/// Highlight type enum
|
||||
@@ -65,7 +66,7 @@ class HighlightBox extends StatelessWidget {
|
||||
// Title with icon
|
||||
Row(
|
||||
children: [
|
||||
Icon(_getIcon(), size: 20, color: const Color(0xFF92400E)),
|
||||
FaIcon(_getIcon(), size: 18, color: const Color(0xFF92400E)),
|
||||
const SizedBox(width: 8),
|
||||
Text(
|
||||
title,
|
||||
@@ -98,9 +99,9 @@ class HighlightBox extends StatelessWidget {
|
||||
IconData _getIcon() {
|
||||
switch (type) {
|
||||
case HighlightType.tip:
|
||||
return Icons.lightbulb;
|
||||
return FontAwesomeIcons.lightbulb;
|
||||
case HighlightType.warning:
|
||||
return Icons.error_outline;
|
||||
return FontAwesomeIcons.circleExclamation;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ library;
|
||||
|
||||
import 'package:cached_network_image/cached_network_image.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/theme/colors.dart';
|
||||
import 'package:worker/features/news/domain/entities/news_article.dart';
|
||||
@@ -67,8 +68,8 @@ class NewsCard extends StatelessWidget {
|
||||
width: 80,
|
||||
height: 80,
|
||||
color: AppColors.grey100,
|
||||
child: const Icon(
|
||||
Icons.image_outlined,
|
||||
child: const FaIcon(
|
||||
FontAwesomeIcons.image,
|
||||
size: 24,
|
||||
color: AppColors.grey500,
|
||||
),
|
||||
@@ -116,8 +117,8 @@ class NewsCard extends StatelessWidget {
|
||||
Row(
|
||||
children: [
|
||||
// Date
|
||||
const Icon(
|
||||
Icons.calendar_today,
|
||||
const FaIcon(
|
||||
FontAwesomeIcons.calendar,
|
||||
size: 12,
|
||||
color: Color(0xFF64748B),
|
||||
),
|
||||
|
||||
@@ -6,6 +6,7 @@ library;
|
||||
|
||||
import 'package:cached_network_image/cached_network_image.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/theme/colors.dart';
|
||||
import 'package:worker/features/news/domain/entities/news_article.dart';
|
||||
@@ -66,8 +67,8 @@ class RelatedArticleCard extends StatelessWidget {
|
||||
width: 60,
|
||||
height: 60,
|
||||
color: AppColors.grey100,
|
||||
child: const Icon(
|
||||
Icons.image_outlined,
|
||||
child: const FaIcon(
|
||||
FontAwesomeIcons.image,
|
||||
size: 20,
|
||||
color: AppColors.grey500,
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user