A Flutter news application using Clean Architecture, Riverpod for state management, and GoRouter for navigation.
- Fetch news from NewsAPI
- View article details
- Save articles for offline reading
- Search functionality
- Dark/Light theme toggle
- Pagination
- Pull-to-refresh
The app follows Clean Architecture with three main layers:
- Presentation Layer: Contains UI components, widgets, and state management.
- Domain Layer: Contains business logic, entities, and use cases.
- Data Layer: Handles data sources (remote and local) and repositories.
- Clone the repository
- Run
flutter pub getto install dependencies - Run the app with
flutter run
- flutter_riverpod: State management
- http: For API calls
- sqflite: For local storage
- url_launcher: For opening URLs in browser
- go_router: For navigation
- cached_network_image: For image caching
- Used a simple SQLite database for local storage which might not be optimal for large datasets.
- Error handling is basic and could be improved with more user-friendly messages.
- Pagination is implemented with a simple page number increment.