A news app, that displays top headlines. Used Provider for state management.
Screenrecording_20241213_073442.mp4
Simulator.Screen.Recording.-.iPhone.15.Pro.-.2024-12-13.at.08.00.29.1.mp4
- Flutter SDK version: 3.22.3
Download Flutter SDK
-
Clone the Repository
Clone this repo using:git clone <RepoLink>
-
Run the following command to install dependencies: flutter pub get
-
Get your API key from NewsAPI. NewsAPI
-
Add the API key during compile time using the following flag: --dart-define=NEWS_API_KEY=<YOUR_API_KEY>
You can also create a launch.json file where you can append the following args block for different build modes (debug, release, profile): { "configurations": [ { "name": "Debug", "program": "lib/main.dart", "args": ["--dart-define=NEWS_API_KEY=<YOUR_API_KEY>"] }, { "name": "Release", "program": "lib/main.dart", "args": ["--dart-define=NEWS_API_KEY=<YOUR_API_KEY>"] }, { "name": "Profile", "program": "lib/main.dart", "args": ["--dart-define=NEWS_API_KEY=<YOUR_API_KEY>"] } ] }