A cross‑platform Flutter app to browse breaking and category‑based news, with a smooth carousel, image caching, and in‑app article viewing. Built with clean widgets and lightweight services. ✨
- 🚀 Landing experience: Simple onboarding with a clean call‑to‑action.
- 🗞️ Breaking news carousel: Auto‑playing image slider with pager indicator.
- 📈 Trending list: Fast, scrollable list with cached images.
- 🏷️ Category browsing: Business, Entertainment, General, Health, Sports.
- 🌐 In‑app reader: Opens articles via
webview_flutter. - ⚡ Performance:
cached_network_imageand shimmer placeholders.
- Flutter (Material 3)
- HTTP for REST calls
- cached_network_image, carousel_slider, smooth_page_indicator, webview_flutter, shimmer
httpcached_network_imagecarousel_slidersmooth_page_indicatorwebview_fluttershimmer
- Flutter SDK 3.x and Dart 3.x installed
- NewsAPI.org API key (free tier works for development)
git clone https://github.com/<your-username>/newsapp.git
cd newsapp
flutter pub get
flutter runThis project uses the NewsAPI.org endpoints. Replace the inline apiKey query parameter in these files with your own key:
lib/services/news.dartlib/services/slider_data.dartlib/services/show_category_news.dart
Example (replace the value after apiKey=):
https://newsapi.org/v2/top-headlines?...&apiKey=YOUR_API_KEY
Tip: For a cleaner setup, you can extract the key into a constant (e.g., lib/secrets.dart) and interpolate it in the URLs.
- Android:
flutter run -d android - iOS:
flutter run -d ios(requires Xcode/macOS) - Web:
flutter run -d chrome - Windows/macOS/Linux:
flutter run -d windows(ormacos/linux)
- Android APK:
flutter build apk --release - iOS:
flutter build ios --release - Web:
flutter build web
lib/
main.dart # App entry; sets up MaterialApp and routes
pages/ # UI screens (landing, home, category, details)
services/ # Network calls to NewsAPI (breaking, sliders, categories)
models/ # Data models (articles, sliders, categories)
images/ # Local assets (category thumbnails)
- Landing page ➜ "Get Started"
- Home page shows:
- Horizontal category chips (local images)
- Breaking news carousel with pager dots
- Trending articles list
- Tap any item ➜ opens full article in an in‑app WebView
- Respect NewsAPI.org rate limits and terms.
- Avoid committing real API keys. Prefer local config or CI secrets for production builds.
Pull requests are welcome! If you have ideas for features or UI improvements, open an issue first to discuss what you’d like to change. 💡
- Data powered by NewsAPI.org
- Flutter community packages listed above
No license has been explicitly set. Consider adding one (MIT is a common choice) if you intend to share or distribute this project.
Made with ❤️ using Flutter.