Cookbook is a modern Android application built with Flutter that allows users to search for and receive recommendations for food recipes using the Spoonacular API. The app features a beautiful, minimal design with dark mode by default and a sophisticated glassmorphism UI.
- Search Recipes: Users can search for recipes by entering keywords or ingredients with persistent search state
- Recipe Recommendations: Daily personalized recipe recommendations based on user preferences
- Detailed Recipe Information: Each recipe includes detailed information such as ingredients, instructions, nutritional information, and cooking time
- Save Favorite Recipes: Users can save their favorite recipes for quick access later with local storage
- Cuisine Categories: Browse recipes by cuisine type with interactive filter pills
- Theme Toggle: Switch between light and dark modes with a beautiful theme system
- Modern Design: Complete UI overhaul with minimal, unique aesthetic
- Dark Mode Default: Beautiful dark theme with light mode option
- Glassmorphism Background: Sophisticated background with gradients, patterns, and floating animations
- Floating Navigation: Minimal pill-style bottom navigation with backdrop blur effects
- State Persistence: Search state and navigation state preserved across page switches
- Responsive Layout: Optimized layouts for different screen sizes
- Visual Feedback: Toast notifications and loading states for better user experience
- Hive Database: Fast, local NoSQL database for storing favorites
- Provider State Management: Efficient state management across the app
- Optimized Navigation: IndexedStack with AutomaticKeepAliveClientMixin for smooth transitions
- Error Handling: Comprehensive error handling with user-friendly messages
The app showcases a beautiful glassmorphism design with smooth animations and floating elements in both light and dark themes.
-
Clone the repository:
git clone https://github.com/CrayFish0/cookbook.git cd cookbook -
Install dependencies:
flutter pub get
-
Generate Hive adapters:
flutter packages pub run build_runner build --delete-conflicting-outputs
-
Set up the Spoonacular API key:
-
Obtain an API key from Spoonacular.
-
In the Secrets folder add your api key:
const spoonacularApi = 'YOUR_API_KEY_HERE';
-
-
Run the app:
flutter run
-
Search for Recipes:
- Enter keywords or ingredients in the search bar to find recipes
- Search state persists when navigating between pages
-
Browse by Cuisine:
- Explore different cuisine categories from the home page
- Use filter pills to refine your search by cuisine type
-
View Recipe Details:
- Tap on a recipe to view detailed information including ingredients, instructions, and summary
- See nutritional information and cooking time
-
Save Favorite Recipes:
- Tap the plus icon on a recipe to save it to your favorites
- Access saved recipes from the favorites page
- Remove favorites by tapping the delete icon
-
Customize Your Experience:
- Toggle between light and dark mode using the theme button
- Enjoy the beautiful glassmorphism background and animations
-
Daily Recommendations:
- Discover new recipes with daily personalized recommendations on the home page
- Flutter - UI framework
- Spoonacular API - Recipe data source
- http - HTTP client for API calls
- provider - State management
- google_nav_bar - Modern bottom navigation
- fluttertoast - Toast notifications
- expandable_text - Expandable text widgets
- hive - Fast, local NoSQL database
- hive_flutter - Hive Flutter integration
- path_provider - File system access
- build_runner - Code generation
- hive_generator - Hive adapter generation
- flutter_launcher_icons - App icon generation
The app features a modern design system with:
- Color Scheme: Carefully crafted color palette for both light and dark modes
- Typography: Custom font family (Arial) with consistent text styles
- Glassmorphism: Sophisticated background with blur effects and gradients
- Animations: Smooth transitions and floating shape animations
- Responsive Design: Adaptive layouts for different screen sizes
lib/
βββ main.dart # App entry point
βββ model/ # Data models
β βββ favourite.dart # Favorite recipe model
β βββ favourite.g.dart # Generated Hive adapter
β βββ favourite_database.dart # Database operations
βββ pages/ # App screens
β βββ home_page.dart # Home screen with recommendations
β βββ search_page.dart # Recipe search screen
β βββ favourite_page.dart # Saved favorites screen
β βββ cuisine_page.dart # Cuisine-specific recipes
β βββ information_page.dart # Recipe details screen
β βββ main_page.dart # Main navigation wrapper
βββ theme/ # Theme and styling
β βββ theme.dart # Light/dark theme definitions
βββ util/ # Utility widgets and helpers
β βββ background_widget.dart # Glassmorphism background
β βββ bottom_nav_bar.dart # Custom navigation bar
β βββ favourite_tile.dart # Favorite recipe tile
β βββ small_tile.dart # Recipe preview tile
β βββ recommend_tile.dart # Recommendation tile
β βββ ... # Other utility widgets
βββ assets/ # App resources
βββ icon.png # App icon
βββ Logo.png # App logo
- Migrated from Isar to Hive: Improved compatibility and build stability
- Local Storage: Efficient favorite recipe storage with automatic data persistence
- Type Safety: Generated type adapters for reliable data serialization
- Provider Pattern: Clean separation of UI and business logic
- State Persistence: Navigation and search state preserved across app lifecycle
- Automatic Keep Alive: Optimized memory usage with selective widget retention
- Lazy Loading: Efficient image loading with error handling
- Optimized Layouts: Reduced widget rebuilds and improved scroll performance
- Memory Management: Proper disposal of resources and listeners
- Android Gradle Plugin: Updated to version 7.3.0 for compatibility
- Kotlin Integration: Proper Kotlin support with version 1.8.22
- Code Generation: Automated adapter generation with build_runner
We would like to thank the following resources and communities for their invaluable contributions:
- Spoonacular for providing an extensive food and recipe API
- The Flutter community for their continuous support and contributions
- Pub.dev for hosting and maintaining a plethora of Flutter packages
- The Hive team for creating a fast, local database solution
- All the contributors who helped improve this project
This project is licensed under the MIT License - see the LICENSE file for details.
For any questions or concerns, please open an issue or contact us at here.
β¨ Complete UI/UX Overhaul: Modern, minimal design with dark mode default
π¨ Glassmorphism Effects: Beautiful background animations and blur effects
π Enhanced Search: Persistent search state and improved filtering
πΎ Better Data Storage: Migrated to Hive for improved performance
π Performance Improvements: Optimized navigation and state management
π― Better UX: Toast notifications, loading states, and responsive design
Happy cooking with the new and improved Cookbook! π³







