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.
- 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.
Add your screenshots here if available.
- Flutter SDK
- Dart 3.7+
- Clone this repository:
git clone https://github.com/oscar-gom/Cocktail-Tinder.git cd cocktail_tinder - Install dependencies:
flutter pub get
- Run the app:
flutter run
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
- Flutter
- Hive & hive_flutter — Local storage
- dio — HTTP client
- swipable_stack — Tinder-like swipe UI
- connectivity_plus — Network status
- flutter_riverpod — State management
Cocktails are fetched from TheCocktailDB using the /random.php endpoint.
- 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.
- To change the number of cocktails loaded initially or per batch, adjust
_initialLoadCountand_batchLoadCountinhome_page.dart. - To modify the grid layout, edit
_getCrossAxisCountinmy_cocktails_page.dart.
This project is for educational and personal use. See TheCocktailDB terms for API usage.
Enjoy discovering new cocktails! (Drink responsibly)