Skip to content

What Should I Eat is a Flutter application that helps users decide what to eat based on cuisine preferences and meal times. It's designed to solve the common dilemma of choosing meals by providing food recommendations with a fun, interactive interface.

Notifications You must be signed in to change notification settings

mj-kiwi/what_to_eat

Repository files navigation

What Should I Eat

A Flutter application that helps you decide what to eat based on cuisine preferences and meal times. The app provides food recommendations and supports multiple languages.

Features

  • Random food selection based on cuisine and meal time
  • Cuisine filtering
  • Smart meal time detection based on current time
  • Recommendations for similar foods
  • Celebration animations when food is selected
  • Multi-language support (English, Chinese, Japanese, French, Spanish, Portuguese)

Technology Stack

Core Framework and Language

  • Flutter: Cross-platform UI framework allowing the app to run on iOS, Android, Web, and macOS
  • Dart: Programming language for Flutter app development

State Management

  • Flutter Bloc / Cubit:

    • Used for application state management
    • Multiple Cubits implemented:
      • LocaleCubit: Manages language settings
      • CuisineCubit: Manages cuisine selection
      • FoodCubit: Manages food selection and recommendations
  • Equatable:

    • Simplifies comparison logic for Bloc/Cubit state classes
    • Used in LocaleState, CuisineState, and FoodState

Internationalization and Localization

  • Flutter Intl:
    • Internationalization through flutter_gen/gen_l10n/app_localizations.dart
    • Support for multiple languages using ARB files (app_en.arb, app_zh.arb, etc.)

UI Components and Animation

  • Material Design:

    • UI built with Flutter's Material components
    • Custom themes and color schemes
  • AnimatedTextKit:

    • Creates text animation effects during food selection
  • Confetti:

    • Displays celebration effects after food selection
    • Controlled via ConfettiController

Project Architecture

  • Layered Architecture:

    • blocs: State management logic
    • models: Data models (e.g., Food class)
    • screens: UI interfaces
    • utils: Utility classes and helper functions
    • l10n: Internationalization resources
  • BLoC Pattern:

    • Business Logic Components separate UI and business logic
    • UI integration via BlocProvider and BlocBuilder

Data Management

  • Local Data:
    • Food data defined directly in code (FoodData class)
    • No external database or API dependencies

Platforms

This app can run on multiple platforms:

  • iOS
  • Android
  • Web
  • macOS

Getting Started

  1. Ensure you have Flutter installed on your machine
  2. Clone this repository
  3. Run flutter pub get to install dependencies
  4. Run flutter run to start the app on your connected device or simulator

Screenshots

Here are some screenshots of the application:

Desktop

Mobile

Web

About

What Should I Eat is a Flutter application that helps users decide what to eat based on cuisine preferences and meal times. It's designed to solve the common dilemma of choosing meals by providing food recommendations with a fun, interactive interface.

Topics

Resources

Stars

Watchers

Forks