搜索插件、代码仓与 APP 分类

GitHub 代码仓ArpitAswal/Global-News

Global-News

全球新闻旨在为用户提供无缝且用户友好的方式,轻松获取全球新闻。该应用专注于提供流畅的用户体验,同时确保用户能够轻松找到并阅读与其兴趣和位置相关的新闻文章。

Global-News 项目封面
星标
2
复刻
0
最近推送(UTC)
2025年3月1日
项目状态
未归档

原始 README

以下为英文项目原文快照,最新内容请访问 GitHub。

App Logo

Click on a logo to download the latest version of the app apk file:

ic_launcher

Project Title: Global News

Global News is a dynamic mobile application built using Flutter and Dart, designed to keep users informed with up-to-date global news articles. The app fetches news articles using an API and displays them based on the user's location and preferences. With a focus on user-friendly design and seamless experience, Global News ensures that users have easy access to the latest news from around the world. The app features a splash screen that transitions smoothly into the Home screen, where users are presented with top headlines and other news stories based on their country, automatically determined by the device location.

Features

Splash Screen
  • A splash screen is displayed upon launching the app, enhancing the user interface experience.
Top Headlines
  • Stay informed with top headlines from around the globe.
Country & Category Selection
  • Filter news based on country or category, including technology, business, health, sports, and more.
Search Functionality
  • Easily find articles by keywords.
Lazy Loading
  • News articles load as you scroll, optimizing performance and speed.
Refresh Capability
  • Quickly refresh content to view the latest updates.
Voice Text Feature
  • For added accessibility, the NewsDetail screen includes a voice text feature.
Gemini AI Chatbox
  • The app introduces the Gemini AI Chatbox, powered by the Gemini-1.5-flash model. Available on nearly every screen, this AI assistant allows users to ask questions and receive informative responses with up to 80-90% accuracy, though without creative interpretations or confidential information.
Smooth User Interface
  • Designed for a seamless, user-friendly experience with a focus on readability and easy navigation.

Installation

To run this project locally:

  • Clone the repository: git clone https://github.com/ArpitAswal/Global-News.git

  • Navigate to the project directory: cd Global-News

  • Install dependencies: flutter pub get

  • Set up API Key: Obtain an API key from News API.

    Create a new file named lib/config.dart in the project directory.

    Add the following code, replacing 'YOUR_API_KEY' with your News API key:

    class Config { static const String apiKey = 'YOUR_API_KEY'; }

    Or directly used in API networking calls.

  • Run the app: flutter run

Note

  • Users must grant location permission for the app to function, as it uses, the device's location to fetch news data.

  • Users may need to refresh the screen after allowing location access from the settings for the first time.

  • The API may not provide, perfectly accurate data, as it does not support fetching articles solely by country. This is particularly relevant for top headlines. For more information about the API, visit News API: "https://newsapi.org/"

Tech Stack

  • Flutter: The primary framework for building the mobile application.

  • Dart: The programming language used with Flutter.

  • News API: For, fetching global news articles.

  • Gemini API: Gemini API for processing text-based queries and providing informative answers.

Challenges

Location Permissions:
  • Ensuring user privacy while handling location-based news.
API Limitations:
  • Managing API rate limits for a smooth, continuous experience.
Cache Mecahnism:
  • Providing cache data during the network connection problem

Future Enhancements

Advanced Filtering
  • Users will be able to filter the news list by date ranges, allowing them to view articles published within specific periods (e.g., X to Y date). Additional sorting options will include relevance, popularity, and publication date, giving users more control over how they view news stories.
User Account and Saved Articles
  • The app will offer user account profiles where they can manage their information and preferences. Within their profile, users will have access to a Favorites Section to save or like articles they want to revisit. This feature will allow users to save articles directly from the NewsDetail screen, creating a personalized library of favourite content.
Sign-In and Sign-Out
  • The addition of sign-in and sign-out options will support the Favorites Section, allowing users to maintain their saved articles across devices and sessions.

Usage Flow

  • The user opens the Global News app and the splash screen is displayed.

Screenshot_2024-08-09-22-32-44-247_com example global_news

  • The user is taken to the home screen, where top headlines and other news articles are displayed based on the default country but before that it will display a shimmer effect until data is fetched.

Screenshot_2024-11-03-20-17-06-901_com example global_news

  • this image shows the different scenarios while displaying the data list

InCollage_20241104_135019455

InCollage_20241104_135141970

  • The user can search for specific articles using the search feature.

Screenshot_2024-11-03-20-17-13-615_com example global_news

Screenshot_2024-11-04-18-24-43-060_com example global_news

  • The user can select a different country to view news articles specific to that location.

Screenshot_2024-11-03-19-50-27-539_com example global_news

  • The user can navigate to the categories screen to view articles by category.

Screenshot_2024-11-04-00-06-30-889_com example global_news

  • The user can see more details about the article by clicking on the individual article and even in detail screen user can see more about an article from the browser by clicking on the site URL.

Screenshot_2024-08-09-22-33-57-182_com example global_news

Screenshot_2024-11-04-18-25-00-082_com example global_news

  • Here is the Gemini AI chat box screen-

Screenshot_2024-11-04-11-17-58-139_com example global_news

Contributing

Contributions are always welcome!

Fork the Repository:
  • Go to the original repository on GitHub or GitLab.
  • Click the "Fork" button. This creates a copy of the repository under your own account.
Create a New Branch:
  • Clone your forked repository to your local machine: git clone <your_fork_url>
  • Create a new branch for your feature: git checkout -b feature-branch
  • Replace feature-branch with a descriptive name for your changes (e.g., fix-bug, add-feature).
Make Changes and Commit:
  • Make the necessary changes to the code in your local feature-branch.
  • Stage the changes: git add (or git add . to stage all changes)
  • Commit the changes with a clear message: git commit -m "Add new feature"
  • Use a descriptive and concise message that explains the changes.
Push Changes to Your Fork:
  • Push your feature-branch to your remote repository: git push origin feature-branch
Create a Pull Request:
  • Go back to the original repository on GitHub or GitLab.
  • Click the "New Pull Request" button.
  • Select your feature-branch as the source and the original repository's main or develop branch as the target.
  • Provide a clear description of your changes and why they are needed.
  • Submit the pull request.

Feedback

  • If you have any feedback, please reach out to me at arpitaswal995@gmail.com
  • If you face an issue, then open an issue in a GitHub repository.

Design Philosophy

Global News is designed to provide users with easy access to global news in a seamless and user-friendly manner. The app focuses on delivering a smooth user experience while ensuring that users can easily find and read news articles relevant to their interests and location.

Arpit Aswal GitHub avatar
GitHub 作者

Arpit Aswal ↗

Flutter Developer | Building enterprise mobile applications | Open Source Contributor | AI Applications

UttarPradesh, India
语言DartC++CMakeSwiftHTMLCKotlinObjective-C

分类

使用的依赖

依赖清单 24 项

如何选择适合项目的代码仓?

先按使用场景筛选,再比较项目活跃情况,最后到原始仓库核对使用要求。

  1. 通过仓库名、作者或描述搜索,再按技术分类缩小范围。
  2. 结合星标、复刻与最近推送比较项目;星标反映社区关注,不代表质量保证。
  3. 使用前在 GitHub 核对 README、许可证与 Issues。

来源与维护

“A repository is the most basic element of GitHub.”

GitHub Docs — About repositories ↗