Unsplash Integration
Each wonder has a dedicated Unsplash collection ID:lib/logic/data/wonder_data.dart
Photo Collections
Photo IDs are pre-fetched and stored locally:lib/logic/data/unsplash_photo_data.dart
Unsplash Service
The service handles photo loading (used primarily for development):lib/logic/unsplash_service.dart
Unsplash Logic
The logic layer provides access to photo collections:lib/logic/unsplash_logic.dart
Photo Gallery UI
The gallery displays photos in a 5×5 grid with unique navigation:lib/ui/screens/photo_gallery/photo_gallery.dart
Grid Navigation
Unique grid-based navigation allows 4-directional movement:Swipe Gestures
Keyboard Navigation
Grid Positioning
The grid is offset to keep the selected image centered:Image Display
Images are rendered with responsive sizing:Image Scaling
Selected image scales up 15% for emphasis:Animated Cutout Overlay
A dynamic overlay highlights the selected image:Fullscreen Viewer
Tapping the selected image opens fullscreen mode:- Swipe between photos
- Pinch to zoom
- Double-tap to zoom
- Share button
- Download option
- Exit returns to previous grid position
Hidden Collectibles
One grid position contains a hidden collectible:Responsive Image Sizes
Performance Optimizations
- Self-Hosted CDN: Images served from wonderous.info CDN for speed
- Pre-sized Images: Multiple sizes (400, 800, 1200, 2400) pre-generated
- Lazy Loading: Only visible images loaded
- Image Caching: Flutter’s built-in network image caching
- Transform Animations: GPU-accelerated transforms
- RepaintBoundary: Isolates grid repaints
Accessibility
- Semantic labels for each photo position
- Focus management for keyboard navigation
- Screen reader support
- Live region announcements when selection changes
- High contrast mode support
User Experience Details
- Haptic Feedback: Light impact on swipe
- Smooth Animations: Configurable durations
- Edge Prevention: Can’t scroll beyond grid bounds
- Visual Feedback: Selected image scales and overlay cutout
- Gesture Detection: Eight-way swipe detection