A sophisticated Flutter news application that mimics the Google News experience. It uses NewsAPI.org to fetch real-time headlines and articles from around the globe, featuring local persistent storage, multi-language support, and optimized performance.
- 🚀 Real-Time News: Fetches the latest headlines across multiple categories (General, Business, Technology, Sports, etc.).
- 🔍 Advanced Search: Search for specific topics or keywords globally.
- 🔖 Bookmarks System: Save your favorite articles to read later. Bookmarks are persisted locally using Shared Preferences.
- 🌍 Localization: Full support for English and Arabic (RTL) with dynamic language switching.
- 📶 Smart Connectivity: Real-time internet connection monitoring with automatic refresh logic and user feedback.
- ⚡ Performance Optimized:
- Background Parsing: JSON decoding is handled in background isolates (
compute) to keep the UI buttery smooth. - Image Caching: Optimized image loading with
cached_network_imageto reduce data usage and improve scrolling. - Local Caching: API responses are cached locally for 5 minutes to ensure instant loading and reduce API calls.
- Background Parsing: JSON decoding is handled in background isolates (
- 🎨 Modern UI/UX:
- Material 3 Design.
- Shimmer loading effects for a premium feel.
- Responsive layout for various screen sizes.
- Shared transitions and clean card designs.
- Core: Flutter SDK
- State Management: BLoC (Business Logic Component) for clean separation of concerns.
- Networking: HTTP for REST API communication.
- Local Storage: Shared Preferences for caching and user preferences.
- Data Persistence: Articles and bookmarks are serialized via
jsonand stored locally. - Image Handling: Cached Network Image & Shimmer.
- Utility: Equatable for state comparison and Internet Connection Checker Plus.
- Initialization: On startup, the app checks for a saved locale and initializes the
NewsBloc,BookmarkBloc, andLocaleBloc. - Data Fetching: The
NewsServiceattempts to fetch data from the local cache first. If expired or missing, it makes an HTTP call to NewsAPI. - Smooth UI: While data is fetching, Shimmer UI placeholders are shown. Images are lazy-loaded and cached.
- Interaction: Users can search, filter by category, bookmark articles, or tap to read the full story in an optimized external browser.
- Robustness: If the connection is lost, the app notifies the user and offers a retry mechanism once the connection is restored.
This project uses the free tier from NewsAPI.org.
- Clone the repository.
- Run
flutter pub get. - (Optional) Replace the
_apiKeyinlib/features/data/services/news_service.dartwith your own key. - Run
flutter run.
Feel free to ⭐ star, 🍴 fork, and contribute to the project.
Pull requests and suggestions are always welcome!







