Skip to content

karan2527/Trendo

Repository files navigation

πŸ“° Trendo - Modern News App

Flutter Dart News API Android iOS

πŸš€ A Beautiful, Modern News Application Built with Flutter

Stay updated with the latest news from around the world with an intuitive and elegant user interface.


✨ Features

🎯 Core Features

  • πŸ“± Modern UI/UX Design - Clean, intuitive interface following Material Design principles
  • 🌍 Global News Coverage - Access to worldwide news from reliable sources
  • πŸ“‚ Category-Based Navigation - Organized news sections (Business, Entertainment, Science, Sports, Technology)
  • πŸ”„ Real-time Updates - Latest news fetched from NewsAPI
  • πŸ“– Full Article View - Integrated WebView for complete article reading
  • 🎨 Responsive Design - Optimized for various screen sizes and orientations

πŸ›‘οΈ Technical Features

  • πŸ” Secure API Key Management - Environment variables for sensitive data
  • ⚑ Optimized Performance - Efficient API calls and image loading
  • 🌐 Network Error Handling - Graceful handling of connectivity issues
  • πŸ“± Cross-Platform - Runs seamlessly on both Android and iOS
  • 🎭 Loading States - Beautiful loading indicators and error states

πŸ“± Screenshots

Home Screen Category View Article Reader
Home Screen Category View Sports View Category View Article Reader

πŸ› οΈ Technology Stack

Technology Purpose Version
Flutter Cross-platform UI framework Latest
Dart Programming language Latest
NewsAPI News data source v2
HTTP API communication ^1.5.0
WebView Flutter In-app browser ^3.0.1
Flutter DotEnv Environment variables ^5.2.1

πŸš€ Quick Start

Prerequisites

Before you begin, ensure you have the following installed:

  • Flutter SDK (Latest stable version)
  • Dart SDK (Included with Flutter)
  • Android Studio or VS Code with Flutter extensions
  • Git for version control

Installation

  1. Clone the repository

    git clone https://github.com/yourusername/trendo.git
    cd trendo
  2. Install dependencies

    flutter pub get
  3. Set up environment variables

    # Copy the environment template
    cp .env.example .env
    
    # Edit .env and add your NewsAPI key
    # Get your free API key from: https://newsapi.org/
  4. Configure your API Key

    Edit the .env file:

    NEWS_API_KEY=your_actual_api_key_here
  5. Run the application

    flutter run

πŸ”§ Configuration

NewsAPI Setup

  1. Visit NewsAPI.org
  2. Create a free account
  3. Generate your API key
  4. Add the key to your .env file as shown above

Environment Variables

The application uses environment variables for secure configuration:

# .env file
NEWS_API_KEY=your_newsapi_key_here

⚠️ Important: Never commit your .env file to version control. It's already included in .gitignore.


πŸ“ Project Structure

lib/
β”œβ”€β”€ config/
β”‚   β”œβ”€β”€ api_config.dart          # API configuration management
β”‚   └── api_keys_template.dart   # Template for API keys
β”œβ”€β”€ models/
β”‚   β”œβ”€β”€ article_model.dart       # Article data model
β”‚   └── show_category.dart       # Category model
β”œβ”€β”€ pages/
β”‚   β”œβ”€β”€ home.dart               # Main home screen
β”‚   β”œβ”€β”€ category_news.dart      # Category-specific news
β”‚   β”œβ”€β”€ article_view.dart       # Full article view
β”‚   └── onboarding.dart         # App onboarding
β”œβ”€β”€ services/
β”‚   β”œβ”€β”€ news.dart              # General news API service
β”‚   └── show_category_news.dart # Category news service
└── main.dart                  # Application entry point

assets/
β”œβ”€β”€ images/                    # Static images and icons
└── screenshots/              # App screenshots for README

🎨 Key Components

Home Screen

  • Hottest News - Horizontal scrollable trending articles
  • Explore Categories - Circular category navigation
  • Trending News - Vertical scrollable news feed

Category Screen

  • Dynamic news filtering by category
  • Responsive grid layout
  • Pull-to-refresh functionality

Article Viewer

  • Full-screen WebView integration
  • Loading indicators
  • Navigation controls

πŸ“‹ Requirements

Minimum Requirements

  • Flutter: 3.0.0+
  • Dart: 3.0.0+
  • Android: API level 21 (Android 5.0)
  • iOS: 11.0+

Recommended

  • RAM: 4GB minimum, 8GB recommended
  • Storage: 2GB free space
  • Internet: Stable connection for news fetching

Common Issues

  1. API Key Not Working

    • Ensure your NewsAPI key is valid and active
    • Check .env file configuration
    • Verify internet connectivity
  2. Build Errors

    • Run flutter clean && flutter pub get
    • Check Flutter version compatibility
    • Ensure all dependencies are up to date
  3. WebView Issues

    • Enable internet permissions in android/app/src/main/AndroidManifest.xml
    • For iOS, configure Info.plist for web content

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

MIT License

Copyright (c) 2024 Trendo News App

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

⭐ If you found this project helpful, please consider giving it a star!

Made with ❀️ using Flutter

About

Beyond the headlines. Discover the stories shaping our world with Trendo, a beautifully crafted news application powered by Flutter for a seamless reading experience.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors