Skip to content

sonjoybarmon/peekme

Repository files navigation

PeekMe

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.

Features

  • 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.

Screenshots

(Add your screenshots here)

Home Screen Favorites Screen

Getting Started

To get a local copy up and running, follow these simple steps.

Prerequisites

Installation

  1. Clone the repo
    git clone https://github.com/sonjoybarmon/peekme
  2. Navigate to the project directory
    cd peekme
  3. Install dependencies
    flutter pub get
  4. Run the app
    flutter run

Dependencies

  • 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.

Project Structure

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

About

Flutter application.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published