Skip to content

oscar-gom/Cocktail-Tinder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cocktail Tinder

A Flutter app inspired by Tinder, but for discovering and saving cocktails! Swipe through random cocktails, like your favorites to save them locally, and manage your personal cocktail collection. The app adapts to light and dark mode and works offline for your saved cocktails.

Features

  • Swipe to Discover: Swipe left or right to browse random cocktails fetched from TheCocktailDB API.
  • Save Favorites: Like a cocktail to save it to your local favorites using Hive database.
  • Remove from Favorites: If a cocktail is already saved, liking it again will remove it from your favorites.
  • My Cocktails: View your saved cocktails in a responsive grid (2–3 columns depending on screen width).
  • Cocktail Details: Tap a saved cocktail to see its details, including image, glass type, instructions, and a list of ingredients with their measures.
  • Offline Support: Access your saved cocktails even without an internet connection.
  • Dark/Light Mode: The app automatically adapts its colors to the system theme.
  • Connectivity Check: On launch, the app checks for internet connection and allows retrying if offline.

Screenshots

Add your screenshots here if available.

Getting Started

Prerequisites

Installation

  1. Clone this repository:
    git clone https://github.com/oscar-gom/Cocktail-Tinder.git
    cd cocktail_tinder
  2. Install dependencies:
    flutter pub get
  3. Run the app:
    flutter run

Project Structure

lib/
  main.dart                # App entry point, theme, and routing
  data/
    cocktail.dart          # Cocktail model (Hive)
    cocktail_api.dart      # API client for fetching cocktails
  components/
    cocktail_card.dart     # Card widget for swiping cocktails
    cocktail_grid_card.dart# Card widget for grid display
    action_button.dart     # Like/Dislike button widget
    info_row.dart          # Row for displaying info pairs
  views/
    splash_page.dart       # Splash/loading and connectivity check
    home_page.dart         # Main swipe interface
    my_cocktails_page.dart # Saved cocktails grid
    cocktail_detail_page.dart # Details for a saved cocktail

Dependencies

API

Cocktails are fetched from TheCocktailDB using the /random.php endpoint.

How It Works

  • On launch, the app checks for internet connectivity. If offline, it shows a retry option.
  • If online, it loads the HomePage where you can swipe through random cocktails.
  • Liking a cocktail saves it to your local favorites (Hive). If already saved, it removes it from favorites.
  • Access your saved cocktails from the My Cocktails page, displayed in a responsive grid.
  • Tap any saved cocktail to view its details, including all ingredients and their measures.
  • The app UI adapts to light and dark mode automatically.

Customization

  • To change the number of cocktails loaded initially or per batch, adjust _initialLoadCount and _batchLoadCount in home_page.dart.
  • To modify the grid layout, edit _getCrossAxisCount in my_cocktails_page.dart.

License

This project is for educational and personal use. See TheCocktailDB terms for API usage.


Enjoy discovering new cocktails! (Drink responsibly)

About

A tinder-like app to help you discover, save and prepare your favorite cocktails. Made in Flutter

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors