A modern, responsive news aggregation application built with Flutter. This app fetches breaking news and top headlines from across the globe using the NewsAPI, featuring a robust networking layer built with Dio.
- Breaking News: View the latest top headlines from major news sources.
- Category Tabs: Filter news instantly by topic directly from the home screen:
- 💼 Business
- 🎬 Entertainment
- 🏥 Health
- 🧬 Science
- ⚽ Sports
- 💻 Technology
- Optimized Networking: Utilizes Dio for efficient API requests.
- Lazy Loading: Smooth scrolling experience using optimized ListViews/Slivers.
- Framework: Flutter
- Language: Dart
- Networking: Dio (Package)
- API: NewsAPI.org
- UI: Custom Cards, ListView.builder
-
Clone the repository:
git clone [https://github.com/your-username/news-app.git](https://github.com/your-username/news-app.git)
-
Install dependencies:
cd news_app flutter pub get -
Setup API Key (Required):
- Sign up for a free key at NewsAPI.org.
- Navigate to
lib/services/news_service.dart. - Replace the placeholder with your key:
final String apiKey = 'YOUR_API_KEY_HERE';
-
Run the app:
flutter run
lib/
├── models/ # ArticleModel (JSON serialization)
├── services/ # NewsService (Dio requests)
├── views/ # HomeView (Main UI)
├── widgets/ # NewsTile, CategoryList
└── main.dart # Entry point
