Skip to content
MuhammadkhiryPublic

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

📰 News App

A modern Flutter News application that fetches the latest headlines from NewsAPI and displays them in a clean, responsive, and user-friendly interface.

✨ Features

  • 📰 Browse the latest news
  • 📂 Explore news by category
  • 🌐 Fetch live news using REST API
  • 🖼️ Display article images
  • ⏳ Loading indicator while fetching data
  • ⚠️ Error handling for failed requests
  • 📱 Responsive Material Design UI

📸 Screenshots

Home Screen

Loading Loaded

Categories

| Sports | Science |

|----------|--------| | | |

Technology Different Categories

🛠️ Built With

  • Flutter
  • Dart
  • Dio
  • REST API
  • NewsAPI

📂 Project Structure

lib
│
├── components
│   ├── article_builder.dart
│   ├── categories_list.dart
│   ├── category_builder.dart
│   ├── news_view.dart
│   └── news_view_builder.dart
│
├── models
│   ├── article_model.dart
│   └── category_model.dart
│
├── services
│   └── news_service.dart
│
├── views
│   ├── category_view.dart
│   ├── home_view.dart
│   └── main.dart
│
└── assets
    ├── business.avif
    ├── entertainment.avif
    ├── general.avif
    ├── health.avif
    ├── science.avif
    ├── sports.avif
    └── technology.jpeg

📦 Dependencies

dio: ^latest

🚀 Getting Started

Clone the repository

git clone https://github.com/Muhammadkhiry/news_app.git

Navigate to the project

cd news_app

Install dependencies

flutter pub get

Run the application

flutter run

🔑 API Key

This project uses NewsAPI.

Get your free API key from:

https://newsapi.org/

Replace your API key inside:

lib/services/news_service.dart

Example:

const String apiKey = "YOUR_API_KEY";

Note: Never upload your personal API key to GitHub.


🎯 Future Improvements

  • 🔍 Search for news
  • ❤️ Favorite articles
  • 🌙 Dark Mode
  • 🔄 Pull to Refresh
  • 📄 Infinite Scrolling
  • 💾 Local Caching
  • 🌍 Country Selection

👨‍💻 Author

Muhammad Khiry


⭐ If you like this project, don't forget to leave a Star!

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages