A lightweight, mobile-first online ordering application for Pierre's Cafe, built with Flutter for iOS and Android platforms. The app prioritizes speed and minimal user interactions to provide the fastest ordering experience possible.
- Coffee shop customers who want quick mobile ordering
- Users who prefer contactless payment options
- Health-conscious customers looking for healthy food options
- Browse menu items quickly with visual categories
- Add items to cart with minimal taps
- Review and modify order
- Complete purchase using Apple Pay or Google Pay
- Receive order confirmation
- Provider Pattern: Used for cart state management across the app
CartProvidermanages all cart operations (add, remove, clear, calculate totals)
MenuScreen (Home)
↓
CartScreen (Review Order)
↓
CheckoutScreen (Payment)
↓
OrderConfirmationScreen (Success)
↓
MenuScreen (Loop back)
-
Minimal Click Philosophy
- Direct add-to-cart from menu grid
- In-place quantity adjustment
- One-tap category switching
- Single button checkout flow
-
Color System
- Primary: Light Brown (#D4A574) - Warmth, coffee aesthetic
- Secondary: Coffee Green (#8BA888) - Natural, healthy
- Surface: Pale Yellow (#FFF8DC) - Soft, inviting
- Background: Cream (#FFFAF0) - Clean, comfortable
-
Payment Strategy
- Native payment buttons for trust and familiarity
- Support for both iOS (Apple Pay) and Android (Google Pay)
- No manual card entry required
- Hot Coffees: Espresso, Americano, Flat White, Latte, Cappuccino, Black Coffee
- Iced Coffees: Iced Americano, Iced Latte, Iced Coffee
- Price range: $3.00 - $5.00
- Almond Croissant
- Granola Bowl
- Banana Bread
- Oat Muffin
- Protein Energy Balls
- Avocado Toast
- Price range: $3.50 - $7.00
- MenuScreen: Main browsing interface with category tabs
- CartScreen: Order review with edit capabilities
- CheckoutScreen: Payment processing with Apple/Google Pay
- OrderConfirmationScreen: Success state with order details
- MenuItemCard: Grid item with emoji, details, and add controls
- CartItemTile: List item showing quantity and subtotal
- CartFAB: Floating action button with cart count and total
- MenuItem: Product data structure with category and pricing
- CartItem: Cart entry with quantity and calculated totals
- CartProvider: Centralized cart state with ChangeNotifier
lib/
├── main.dart # App entry, provider setup
├── models/
│ ├── menu_item.dart # Data models, enums
│ └── menu_data.dart # Static menu data
├── providers/
│ └── cart_provider.dart # Cart state management
├── screens/
│ ├── menu_screen.dart # Home screen with menu grid
│ ├── cart_screen.dart # Cart review screen
│ ├── checkout_screen.dart # Payment screen
│ └── order_confirmation_screen.dart # Success screen
├── widgets/
│ ├── menu_item_card.dart # Menu item component
│ ├── cart_item_tile.dart # Cart item component
│ └── cart_fab.dart # Cart floating button
└── theme/
└── app_theme.dart # Colors, styles, theme data
User Action → Provider Method → notifyListeners() → UI RebuildExample:
onTap: Add Button
↓
cart.addItem(menuItem)
↓
CartProvider._items.add()
↓
notifyListeners()
↓
Consumer<CartProvider> rebuilds- Uses
paypackage (^2.0.0) - Supports platform-specific payment configurations
- Simulates 2-second processing delay
- Generates unique order numbers
MenuItem
- Unique ID
- Name, description, emoji
- Price (double)
- Category (enum)
- Temperature (optional enum for coffee)
CartItem
- MenuItem reference
- Quantity (mutable)
- Calculated total price
- Grid Layout: Fixed cross-axis count for predictable performance
- Const Constructors: Used throughout for widget reuse
- Provider Scoping: Only rebuilds necessary widgets
- Asset Optimization: Uses emoji instead of images (zero asset loading)
- No login required
- No multi-step forms
- Default quantities to 1
- Persistent cart badge
- Direct navigation paths
- High contrast text
- Large tap targets (minimum 44x44)
- Clear visual hierarchy
- Readable font sizes (14-32pt)
- Clear cart confirmation dialog
- Visual quantity feedback
- Total price always visible
- Payment loading indicators
- Add items to cart from menu
- Modify quantities in cart
- Remove items from cart
- Clear entire cart
- Switch between categories
- View order summary in checkout
- Simulate payment flow
- Verify order confirmation
- Return to menu from confirmation
- Empty cart state
- Maximum quantity handling
- Navigation back button behavior
- Payment cancellation flow
- Configure Apple Merchant ID in Apple Developer portal
- Update
merchantIdentifierin checkout_screen.dart - Add payment processing entitlements in Info.plist
- Test on physical device (required for Apple Pay)
- Submit for App Store review
- Register with payment gateway
- Update
gatewayMerchantIdin checkout_screen.dart - Change environment from "TEST" to "PRODUCTION"
- Configure merchant account
- Test on physical device
- Submit to Google Play
- Order submission API endpoint
- Payment processing webhook
- Order status updates
- Push notifications for order ready
- Order history retrieval
- User accounts and order history
- Loyalty points system
- Saved favorite orders
- Customization options (milk type, sugar, etc.)
- Pickup time selection
- Store location selector
- Push notifications
- Real-time order tracking
- In-app tips
- Dietary filters (vegan, gluten-free)
- Reviews and ratings
- Referral program
dependencies:
flutter: sdk
provider: ^6.1.1 # State management
pay: ^2.0.0 # Payment processing
cupertino_icons: ^1.0.6
dev_dependencies:
flutter_test: sdk
flutter_lints: ^3.0.0Edit lib/models/menu_data.dart:
MenuItem(
id: 'unique_id',
name: 'Product Name',
description: 'Short description',
price: 4.50,
category: ItemCategory.coffee,
emoji: '☕',
)Edit lib/theme/app_theme.dart:
static const Color lightBrown = Color(0xFFD4A574);
static const Color coffeeGreen = Color(0xFF8BA888);
// etc...Edit lib/screens/checkout_screen.dart:
- Line 32:
merchantIdentifierfor Apple Pay - Line 56:
gatewayMerchantIdfor Google Pay
- Flutter Docs: https://docs.flutter.dev
- Provider Package: https://pub.dev/packages/provider
- Pay Package: https://pub.dev/packages/pay
- Apple Pay Guide: https://developer.apple.com/apple-pay
- Google Pay Guide: https://developers.google.com/pay
Built with Flutter • Designed for Speed • Made with ☕