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>
This commit is contained in:
@@ -34,4 +34,16 @@ abstract class OverlayConfig {
|
||||
|
||||
/// Default overlay height for calculations
|
||||
static const double DEFAULT_OVERLAY_HEIGHT = 140.0;
|
||||
|
||||
/// Time after which overlay dims speed display due to stale data
|
||||
static const Duration STALENESS_DIM_THRESHOLD = Duration(seconds: 3);
|
||||
|
||||
/// Time after which overlay shows dashes instead of speed
|
||||
static const Duration STALENESS_DASH_THRESHOLD = Duration(seconds: 10);
|
||||
|
||||
/// Opacity value for dimmed stale state
|
||||
static const double STALENESS_DIM_OPACITY = 0.5;
|
||||
|
||||
/// Interval for checking data staleness
|
||||
static const Duration STALENESS_CHECK_INTERVAL = Duration(seconds: 1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user