diff --git a/docs/superpowers/specs/2026-04-30-easter-egg-design.md b/docs/superpowers/specs/2026-04-30-easter-egg-design.md new file mode 100644 index 0000000..9d40d69 --- /dev/null +++ b/docs/superpowers/specs/2026-04-30-easter-egg-design.md @@ -0,0 +1,55 @@ +# Easter Egg — Fiat Code Reveal + +## Date +2026-04-30 + +## Status +Approved + +--- + +## Overview + +Add a hidden Easter egg to the TracPulse app that opens `https://fiatcode.dev` when triggered, preceded by a fun celebratory animation. + +--- + +## Trigger + +- **Location:** `SettingsScreen` +- **Gesture:** Triple-tap on the Settings screen `AppBar` +- **Feedback:** None until triggered + +--- + +## Animation Sequence + +1. A full-screen semi-transparent overlay appears over the Settings screen +2. Animated "🎉 FIAT CODE! 🎉" text fades in with a scale-up effect +3. Animation holds for ~1.5 seconds, then fades out +4. The URL `https://fiatcode.dev` opens in the browser (via `url_launcher`) + +--- + +## Technical Approach + +- **Overlay:** `Stack` widget layer above current screen content, managed via a stateful overlay widget +- **Animation:** Flutter built-ins — `AnimatedOpacity` + `AnimatedScale` (no extra packages needed) +- **URL Launch:** `url_launcher` package (check if already in `pubspec.yaml`; if not, add it) +- **State:** Local state in `SettingsScreen` controls overlay visibility and animation +- **One-shot:** Overlay auto-dismisses after animation completes; subsequent triple-taps re-trigger + +--- + +## Components + +1. **`EasterEggOverlay` widget** — positioned widget with `AnimatedOpacity` + `AnimatedScale`, displays centered animated text, auto-dismisses via `Future.delayed` +2. **Gesture detector** — `GestureDetector` with `onTap` counting triple-taps on the Settings `AppBar` +3. **URL launcher call** — `await launchUrl(Uri.parse('https://fiatcode.dev'))` after animation completes + +--- + +## Files Affected + +- `lib/settings_screen.dart` — add overlay, gesture detector, animation logic +- `pubspec.yaml` — add `url_launcher` if not already present