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:
@@ -17,12 +17,18 @@ class BigStat extends StatelessWidget {
|
||||
required this.label,
|
||||
required this.value,
|
||||
required this.unit,
|
||||
this.scale = 1.0,
|
||||
});
|
||||
|
||||
final String label;
|
||||
final String value;
|
||||
final String unit;
|
||||
|
||||
/// V3-05: mounted mode reads bigger, at a glance, at speed. Fixed pixel sizes below
|
||||
/// (not the ambient text theme) are what a glove-and-visor readout actually is, so
|
||||
/// scaling has to happen here rather than through `Theme.of(context).textTheme`.
|
||||
final double scale;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final colors = Theme.of(context).colorScheme;
|
||||
@@ -33,7 +39,7 @@ class BigStat extends StatelessWidget {
|
||||
Text(
|
||||
label,
|
||||
style: TextStyle(
|
||||
fontSize: 13,
|
||||
fontSize: 13 * scale,
|
||||
letterSpacing: 2,
|
||||
color: colors.outline,
|
||||
),
|
||||
@@ -46,7 +52,7 @@ class BigStat extends StatelessWidget {
|
||||
Text(
|
||||
value,
|
||||
style: monoDigits.copyWith(
|
||||
fontSize: 64,
|
||||
fontSize: 64 * scale,
|
||||
fontWeight: FontWeight.bold,
|
||||
// Named explicitly. The Compose version rendered black-on-black when the
|
||||
// ambient content colour went missing.
|
||||
@@ -55,7 +61,7 @@ class BigStat extends StatelessWidget {
|
||||
),
|
||||
Text(
|
||||
' $unit',
|
||||
style: TextStyle(fontSize: 18, color: colors.outline),
|
||||
style: TextStyle(fontSize: 18 * scale, color: colors.outline),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user