Palette: seven roles (accent, good, caution added; highlight renamed alarm); no hard-coded colours left
/ crosscheck (push) Successful in 0s
CI / Analyze & Test (push) Successful in 13s
CI / Debug APK (push) Successful in 22s

background, foreground, subdued, accent (emphasis without danger), and the state
gradient good → caution → alarm; surface and onFill derived. smart-serow's
four-key themes still load (highlight = alarm; the new roles fall back).
Material's scheme follows: buttons in accent instead of the alarm colour.
Link state, mock banner, signal tiles, raw log, checklist button and marks,
camera page all take palette roles.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DDwfd6Ki8UfG4hK6W5YpJz
This commit is contained in:
2026-10-14 13:55:52 +09:00
parent 54ea278ca2
commit 3aeb09d61f
11 changed files with 165 additions and 72 deletions
+2 -1
View File
@@ -50,7 +50,8 @@ class GpsCompass extends StatelessWidget {
final theme = AppTheme.of(context);
// No signal = subdued color, valid = foreground
final iconColour = _hasSignal ? theme.foreground : theme.highlight;
// Heading: foreground; acquiring: caution; no receiver at all: alarm.
final iconColour = _hasSignal ? theme.foreground : (_isAcquiring ? theme.caution : theme.alarm);
// Convert to radians, 0 = no rotation when no signal
final angle = _hasSignal ? (heading! * math.pi / 180.0) : 0.0;
+4 -4
View File
@@ -2,7 +2,7 @@
// every readout is a box that takes its share of a row (`flex`) and sizes its type
// from its own height, so a layout is a grid of boxes, and a value changing digits
// never moves anything. Value in foreground with tabular figures, unit and label in
// subdued; a warning turns the value to highlight.
// subdued; a warning turns the value to alarm.
//
// Added for Yukart: [dim]. A missing or stale value is a normal state in a car
// (app guideline 2), shown in subdued rather than hidden.
@@ -28,7 +28,7 @@ class StatBox extends StatelessWidget {
final String label;
final int flex;
/// If it returns true, the value shows in highlight.
/// If it returns true, the value shows in alarm.
final bool Function()? isWarning;
/// Missing or stale: the value shows in subdued.
@@ -41,7 +41,7 @@ class StatBox extends StatelessWidget {
final valueColor = dim
? theme.subdued
: warning
? theme.highlight
? theme.alarm
: theme.foreground;
return Expanded(
@@ -168,7 +168,7 @@ class StatBoxMain extends StatelessWidget {
color: dim
? theme.subdued
: warning
? theme.highlight
? theme.alarm
: theme.foreground,
height: 1,
),
+2 -2
View File
@@ -7,7 +7,7 @@ import '../reading.dart';
import '../theme/palette.dart';
/// An on/off lamp in the boxed pattern: the label is the lamp. Lit in foreground
/// (highlight when [warn]), dark in subdued; missing shows as a dash.
/// (alarm when [warn]), dark in subdued; missing shows as a dash.
class Telltale extends StatelessWidget {
const Telltale({
super.key,
@@ -32,7 +32,7 @@ class Telltale extends StatelessWidget {
final missing = reading.value == null;
final lit = reading.on && !reading.dim;
final color = lit
? (warn ? p.highlight : p.foreground)
? (warn ? p.alarm : p.foreground)
: p.subdued.withValues(alpha: missing ? 0.35 : 0.6);
return Expanded(
flex: flex,