A Flutter application to browse top news headlines, read full articles, and bookmark them with offline support and sync via Firebase.
-
Browse Top Headlines
Fetch and display the latest news from a public News API. -
Article Details View
Tap on a headline to view full article details, including:- Content, author, source, and publication date.
- Bookmark or unbookmark the article (requires login).
-
User Authentication
Sign Up, Sign In, and Sign Out using Firebase Authentication. -
Bookmarks
Save your favorite articles for later access.- Bookmarking is available only for authenticated users.
- Bookmarks are synced between local storage (Hive) and the cloud (Firestore).
-
Offline Support
Access saved (bookmarked) articles even without an internet connection. -
Read Without Login
Users can browse and read articles freely without authentication; logging in is only required to use bookmark features.
| Purpose | Library |
|---|---|
| Framework | Flutter |
| State Management & DI | GetX |
| Authentication | Firebase Auth |
| Cloud Database | Firebase Firestore |
| Local Storage | Hive , hive_flutter |
| File Access | path_provider |
| HTTP Networking | http |
| Connectivity Checks | connectivity_plus |
| Equality & Helpers | equitable , dartz |
| Code Generation | hive_generator, build_runner |
- Domain Layer: Entities, UseCases, Repository Interfaces
- Data Layer: API, Firestore, Hive, and Models
- Presentation Layer: UI, Pages, Widgets, GetX Controllers
- Flutter SDK installed
- Firebase project configured
- FlutterFire CLI installed
- News API key from newsapi.org
git clone <repository_url>
cd news_app
flutter pub get
flutterfire configure
flutter packages pub run build_runner build --delete-conflicting-outputs-
Replace
'YOUR_NEWS_API_KEY'in:
lib/data/datasources/remote/news_api_datasource_impl.dart -
Enable Email/Password auth in Firebase
-
Firestore Structure:
users/{userId}/bookmarks/{articleId}
flutter run| SignIn Screen | Home Sceen | Article Details | Bookmark Screen |
|---|---|---|---|
![]() |
![]() |
![]() |
![]() |



