news page

This commit is contained in:
Phuoc Nguyen
2025-11-03 11:48:41 +07:00
parent 21c1c3372c
commit ea485d8c3a
14 changed files with 2017 additions and 13 deletions

View File

@@ -0,0 +1,27 @@
/// Domain Repository Interface: News Repository
///
/// Defines the contract for news article data operations.
/// This is an abstract interface following the Repository Pattern.
library;
import 'package:worker/features/news/domain/entities/news_article.dart';
/// News Repository Interface
///
/// Provides methods to fetch and manage news articles.
abstract class NewsRepository {
/// Get all news articles
Future<List<NewsArticle>> getAllArticles();
/// Get featured article
Future<NewsArticle?> getFeaturedArticle();
/// Get articles by category
Future<List<NewsArticle>> getArticlesByCategory(NewsCategory category);
/// Get a specific article by ID
Future<NewsArticle?> getArticleById(String articleId);
/// Refresh articles from server
Future<List<NewsArticle>> refreshArticles();
}