This project is a Flutter application that displays a list of blog posts fetched from the JSONPlaceholder API. The app uses Flutter's Material Design components and integrates the Riverpod state management library for managing application state.



Before running the project, ensure you have the following installed:
- Flutter SDK 3.22
- Dart SDK 3.4
- A device or emulator to run the app
-
Clone the repository:
git clone https://github.com/enzoftware/somnio_flutter_challenge.git cd somnio_flutter_challenge
-
Install dependencies:
After navigating to the project directory, run:
flutter pub get
-
Run the project:
To run the project on a connected device or emulator:
flutter run
- Fetches and displays blog posts from the JSONPlaceholder API.
- Implements infinite scroll for loading more posts as the user scrolls down.
- Includes a tab bar with two tabs:
- First Tab: Displays the blog posts.
- Second Tab: Unimplemented Favorites blogs.
- The tab bar remains pinned at the top while scrolling.
- The app utilizes Riverpod for state management.
To run unit and widget tests for the project, use the following command:
flutter test
The project follows the Clean Architecture principles to ensure scalability and maintainability.
- The app uses Riverpod 2.5.1 to manage state across the application. Riverpod helps in keeping the app modular and testable.
lib/features/blog_list
: Contains the presentation and logic for the blog list.lib/widgets
: Contains reusable UI components.lib/core
: Core utilities used across the project.
- Unit tests are implemented for key components of the application.
The app fetches blog posts from the following API:
In case of any issues or questions, feel free to reach out: