https://github.com/alwinvazhappily/flutter_posts_app
Flutter Posts App: Fetch, Store & Display
https://github.com/alwinvazhappily/flutter_posts_app
dart flutter fpdart mvvm-architecture riverpod-state-management sqflite-database
Last synced: 3 months ago
JSON representation
Flutter Posts App: Fetch, Store & Display
- Host: GitHub
- URL: https://github.com/alwinvazhappily/flutter_posts_app
- Owner: alwinvazhappily
- Created: 2025-02-01T09:32:14.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2025-03-12T13:51:52.000Z (7 months ago)
- Last Synced: 2025-04-05T13:15:40.713Z (6 months ago)
- Topics: dart, flutter, fpdart, mvvm-architecture, riverpod-state-management, sqflite-database
- Language: Dart
- Homepage:
- Size: 705 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# flutter_posts_app
Flutter Posts App: Fetch, Store & Display
## Screenshots
## Objective
The goal of this task is to create a Flutter application that fetches posts from a public API, stores them locally using SQLite, and displays them in a user-friendly list format.
## Requirements
1. API Integration: Fetch data from the JSONPlaceholder API.
2. Local Storage: Save the fetched posts in an SQLite database using the sqflite package.
3. State Management: Use flutter_riverpod for managing state and riverpod_annotation for structured MVVM architecture.
4. User Interface: Display posts in a ListView, ensuring that:
• Each item shows the title and body of the post.
• Proper handling of null or empty values for id, title, and body.
• The UI is clean and responsive.
5. Error Handling: Handle API failures, database errors, and empty data cases gracefully.## Technology Stack
1. Flutter: For building the UI.
2. flutter_riverpod & riverpod_annotation: For state management in MVVM architecture.
3. http: For making API requests.
4. sqflite: For local database storage.
5. fpdart: For functional error handling and better state flow.