Files
gps-speedo/lib/config/timing_constants.dart
T
Mikkeli Matlock 505219c858 feat(03-01): create OverlayService and add retry dependency
- Add retry package (^3.1.2) for robust platform operations
- Create OverlayService wrapper for all FlutterOverlayWindow calls
- Implement showOverlay/closeOverlay with 3-attempt retry logic
- Add shareData fire-and-forget with warn-level logging
- Add isActive, overlayListener, checkPermission helpers
- Define staleness constants: 3s dim, 10s dash, 0.5 opacity, 1s check
- Define GPS_GRACE_PERIOD constant (30 seconds)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 19:12:23 +09:00

20 lines
822 B
Dart

// Timer and interval constants — SCREAMING_SNAKE per project convention
/// Timing configuration for background tasks and UI interactions
abstract class TimingConfig {
/// Interval for background heartbeat to keep GPS alive
static const Duration HEARTBEAT_INTERVAL = Duration(seconds: 5);
/// Interval for checking overlay window status
static const Duration OVERLAY_STATUS_CHECK_INTERVAL = Duration(milliseconds: 1000);
/// Delay before closing overlay after tap
static const Duration TAP_CLOSE_DELAY = Duration(milliseconds: 500);
/// Delay for long press gesture signal
static const Duration LONG_PRESS_SIGNAL_DELAY = Duration(milliseconds: 50);
/// GPS grace period - continues for 30s after overlay close when backgrounded
static const Duration GPS_GRACE_PERIOD = Duration(seconds: 30);
}