Files
gps-speedo/lib/core/constants/timing_constants.dart
irene 44480eb969 refactor(data): create layered architecture with core/data/ui packages
- Move constants from lib/config/ to lib/core/constants/
- Move color themes to lib/core/theme/
- Create LocationData domain model in data/models/
- Create lightweight GpsService in data/services/
- Create LocationRepository in data/repositories/ consolidating
  GpsDataManager business logic (GPS stream, staleness, precision)
- Create shared SpeedDisplay widget in ui/shared/
- Defer overlay feature — stubs reserved in ui/features/overlay/
2026-08-23 17:16:43 +09:00

24 lines
1.0 KiB
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
/// DEPRECATED: Replaced by BACKGROUND_GRACE_PERIOD (7s) for lifecycle management
static const Duration GPS_GRACE_PERIOD = Duration(seconds: 30);
/// Background grace period - time before GPS stops when app backgrounded without overlay
static const Duration BACKGROUND_GRACE_PERIOD = Duration(seconds: 7);
}