This Flutter project is a simple News App that fetches data from a public API to display the latest news. It's designed to demonstrate the integration of API calls into a Flutter application.
- Display a list of news articles.
- View detailed information for each news article.
- Support for pulling the latest news data from a remote API.
- Flutter: A UI toolkit for building natively compiled applications for mobile, web, and desktop from a single codebase.
- Dart: The programming language used by Flutter.
- API: The app uses a public news API to fetch real-time news data.
- Make sure you have Flutter installed. If not, follow the official installation guide.
-
Clone the repository:
git clone https://github.com/MuhammadSaqlain143/news_app_using_api.git
-
Navigate to the project directory:
cd news_app_using_api
-
Install dependencies:
flutter pub get
Run the app on an emulator or physical device:
flutter run
- Open the
lib/config/api_config.dart
file. - Replace the placeholder API key with your actual API key.
class ApiConfig {
static const String apiKey = 'YOUR_API_KEY';
}
The app uses the News API to fetch news data. You will need to sign up for a free API key to use this service.
Feel free to contribute to the project by opening issues or submitting pull requests.
If you're interested in hiring me or collaborating on projects, you can reach me at https://muhammadsaqlain.vercel.app/.
This project is licensed under the MIT License - see the LICENSE file for details.
- Thanks to the News API for providing a free and easy-to-use API for fetching news data.