V3-05: mounted (handlebar) mode
Wake lock via a WakelockController seam (mirrors LocationSource), gated strictly to actual recording and released on stop/discard/navigate-away/dispose. High-contrast ripprMountedTheme() applied only to the record screen. BigStat gained a scale param for the headline figure rather than a blanket TextTheme.apply, which crashes on Material 3's default theme.
This commit is contained in:
@@ -15,6 +15,7 @@ const _keyEndpoint = 'upload_endpoint';
|
||||
const _keyDeviceId = 'device_id';
|
||||
const _keyMapEnabled = 'map_enabled';
|
||||
const _keyUnitSystem = 'unit_system';
|
||||
const _keyMountedMode = 'mounted_mode';
|
||||
|
||||
/// Countries that did not adopt metric for everyday distances. Not exhaustive — a
|
||||
/// best-effort default, not a claim of authority. Anyone can override it in Settings.
|
||||
@@ -69,6 +70,14 @@ class Config {
|
||||
: UnitSystem.metric;
|
||||
}
|
||||
|
||||
/// V3-05: a mounted phone is a different product from a pocketed one -- kept awake,
|
||||
/// higher contrast, bigger targets. Off by default; a pocketed ride is still the
|
||||
/// common case.
|
||||
bool get mountedMode => _prefs.getBool(_keyMountedMode) ?? false;
|
||||
|
||||
Future<void> setMountedMode(bool enabled) =>
|
||||
_prefs.setBool(_keyMountedMode, enabled);
|
||||
|
||||
/// Stable per-install id so a server can distinguish riders in a group.
|
||||
String get deviceId {
|
||||
final existing = _prefs.getString(_keyDeviceId);
|
||||
|
||||
Reference in New Issue
Block a user