PeekMe is a simple Flutter application that demonstrates how to fetch data from a REST API, display it in a list, and manage a list of favorite items using local storage. The app fetches user data from the JSONPlaceholder API and presents it in a clean, user-friendly interface.
- Fetch Users: Retrieves a list of users from the JSONPlaceholder API.
- User List: Displays the fetched users in a scrollable list.
- User Details: Shows more details about a user when a user card is tapped.
- Favorites: Allows users to mark and unmark users as favorites.
- Persistent Favorites: Favorite users are saved locally on the device using
shared_preferences. - Simple Navigation: Uses a bottom navigation bar to switch between the home screen and the favorites screen.
(Add your screenshots here)
| Home Screen | Favorites Screen |
|---|---|
![]() |
![]() |
To get a local copy up and running, follow these simple steps.
- Clone the repo
git clone https://github.com/sonjoybarmon/peekme
- Navigate to the project directory
cd peekme - Install dependencies
flutter pub get
- Run the app
flutter run
- http: A composable, multi-platform, Future-based API for HTTP requests.
- shared_preferences: Provides a persistent store for simple data.
- cupertino_icons: Default asset bundle for Cupertino widgets.
The project is structured as follows:
lib/
├── main.dart # App entry point
├── models/
│ └── user.dart # User data model
├── screens/
│ ├── favorites_screen.dart # Screen to display favorite users
│ ├── home_screen.dart # Screen to display all users
│ └── user_details_screen.dart # Screen to display user details
├── services/
│ └── api_service.dart # Service to fetch data from the API
└── widgets/
└── user_card.dart # Widget to display a single user

