Just another news app, built for learning purposes.
The project contains two branches:
- main branch: This branch contains the implementation using the newsapi.org API to fetch the latest news articles.
- with_firestore branch: This alternative approach uses firebase firestore to store the news articles. The articles are uploaded to the firestore using a python script and a JSON file containing the articles.
-
Firebase Authentication : Sign up using email and password
-
Pagination: The news articles are loaded in batches of 10 articles
-
Filtering : Filter news by category
-
Search : Search for news by search term
-
Sorting : Sort news by date, popularity or relevancy
-
Favorites : Save news to favorites
-
Avatar Selection : Select randomly an avatar for your profile
-
Open In Browser : Open the full news article in the default browser
-
Create an account on newsapi.org.
-
Get your API key.
-
Create a file named '.env' in the root directory of the project (not in the lib folder).
-
Add the following line to the .env file and replace <YOUR_API_KEY> with your API key.
API_KEY='<YOUR_API_KEY>'
-
Create a project on firebase.
-
Add and enable firebase authentication with email and password.
-
Add and enable firebase firestore (for saving favorite articles).
-
Make sure you have the firebase CLI installed.
-
Run flutterfire configure and connect your app to your firebase project.
-
Run the app.
-
Create a project on firebase
-
Add and enable firebase authentication with email and password.
-
Add and enable firebase firestore.
-
Make sure you have the firebase CLI installed.
-
Run flutterfire configure and connect your app to your firebase project.
-
Use the python scripts provided in the firebase-data-script folder (in the firebase branch) to upload articles to your firebase firestore (Instructions on how to use the script are provided in the script file).
-
Run the app.