Flutter Habar App is a mobile application that allows users to browse news articles from various sources. The app is built with Flutter and consumes data from the NewsAPI service.
Home Screen | Dark Mode | Detail Screen |
---|---|---|
![]() |
![]() |
![]() |
- Browse news articles by category
- Search for news articles
- Save favorite articles for later reading
- Dark mode support
- Localization support for English and Indonesia
- State management: Bloc pattern with flutter_bloc package
- Networking: Dio package for HTTP requests
- Navigation: Flutter's built-in Navigator widget
- Data storage: Hive package for more complex data storage and for simple key-value storage.
- Image loading: Cached_network_image package
- Date/time formatting: Intl package
- Lint : very_good_analysis package for code style
To use this app, follow these steps:
-
Make sure you have the Flutter SDK installed. If you don't have it, follow the instructions in the official Flutter documentation to install it.
-
Create an account on NewsAPI to get an API key.
-
Clone this repository to your local machine.
-
Open a terminal window and navigate to the project directory.
-
Run the following command to install the required dependencies:
make get
-
Replace
YOUR_API_KEY
in.vscode/launch.json
with your actual NewsAPI API key.{ "name": "Flutter Habar App", "type": "dart", "request": "launch", "program": "lib/main.dart", "flutterMode": "debug", // you can change the mode "args": [ "--dart-define", "news-app-token=YOUR_API_KEY" //replace with your API key ] }
-
Run the app using vscode debug or the following command:
flutter run --dart-define=news-app-token=YOUR_API_KEY
Contributions are welcome! Feel free to open an issue or submit a pull request.
This project is licensed under the Apache License, Version 2.0. See the LICENSE file for more details.