update keep alive filter

This commit is contained in:
Phuoc Nguyen
2025-11-11 15:45:32 +07:00
parent b5afeed534
commit 2f296ad8d3
9 changed files with 96 additions and 64 deletions

View File

@@ -147,7 +147,6 @@ class NewsRemoteDataSource {
'published_on',
'blogger',
'blog_intro',
'content',
'meta_image',
'meta_description',
'blog_category',

View File

@@ -4,6 +4,7 @@
library;
import 'package:json_annotation/json_annotation.dart';
import 'package:worker/core/constants/api_constants.dart';
import 'package:worker/features/news/domain/entities/news_article.dart';
part 'blog_post_model.g.dart';
@@ -97,11 +98,11 @@ class BlogPostModel {
if (metaImage != null && metaImage!.isNotEmpty) {
// If meta_image starts with /, prepend the base URL
if (metaImage!.startsWith('/')) {
imageUrl = 'https://land.dbiz.com$metaImage';
imageUrl = '${ApiConstants.baseUrl}$metaImage';
} else if (metaImage!.startsWith('http')) {
imageUrl = metaImage!;
} else {
imageUrl = 'https://land.dbiz.com/$metaImage';
imageUrl = '${ApiConstants.baseUrl}/$metaImage';
}
} else {
imageUrl = 'https://via.placeholder.com/400x300?text=${Uri.encodeComponent(title)}';

View File

@@ -154,33 +154,8 @@ class _NewsDetailPageState extends ConsumerState<NewsDetailPage> {
),
),
const SizedBox(height: 16),
const SizedBox(height: 8),
// Excerpt
Container(
padding: const EdgeInsets.all(16),
decoration: BoxDecoration(
color: const Color(0xFFF8FAFC),
border: const Border(
left: BorderSide(color: AppColors.primaryBlue, width: 4),
),
borderRadius: const BorderRadius.only(
topRight: Radius.circular(8),
bottomRight: Radius.circular(8),
),
),
child: Text(
article.excerpt,
style: const TextStyle(
fontSize: 16,
color: Color(0xFF64748B),
fontStyle: FontStyle.italic,
height: 1.5,
),
),
),
const SizedBox(height: 24),
// Article Body - Render HTML content
if (article.content != null && article.content!.isNotEmpty)