Skip to content

ronyaburaihan/news_app_flutter

Repository files navigation

📰 News App

A Flutter application to browse top news headlines, read full articles, and bookmark them with offline support and sync via Firebase.


🚀 Features

  • 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.


🔧 Technologies & Libraries

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

🏗️ Architecture (Clean)

  • Domain Layer: Entities, UseCases, Repository Interfaces
  • Data Layer: API, Firestore, Hive, and Models
  • Presentation Layer: UI, Pages, Widgets, GetX Controllers

📲 APK Download

👉 Download APK


⚙️ Setup Instructions

Prerequisites

  • Flutter SDK installed
  • Firebase project configured
  • FlutterFire CLI installed
  • News API key from newsapi.org

🚀 Installation

git clone <repository_url>
cd news_app
flutter pub get
flutterfire configure
flutter packages pub run build_runner build --delete-conflicting-outputs
  1. Replace 'YOUR_NEWS_API_KEY' in:
    lib/data/datasources/remote/news_api_datasource_impl.dart

  2. Enable Email/Password auth in Firebase

  3. Firestore Structure:

users/{userId}/bookmarks/{articleId}

▶️ Run the App

flutter run

🎥 Demonstration

SignIn Screen Home Sceen Article Details Bookmark Screen
SignIn Screen Home Screen Artcile Details Screen Bookmark Screen

About

A Flutter application to browse top news headlines, read full articles, and bookmark them with offline support and sync via Firebase.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors