Consolide le lot applicatif watch companion validé : - télémétrie fréquence cardiaque live remontée montre -> téléphone (collecteur watch, adapter Wear Data Layer, persistance Drift, propagation aux écrans historique/programme/profil/exécution) - notifications de séance en arrière-plan côté téléphone (service foreground de statut + passerelle applicative) - finitions montre : chrono d'étape, score d'étape, retrait du bouton "lancer une séance", thème, icônes et polices watch_app Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
94 lines
2.6 KiB
Dart
94 lines
2.6 KiB
Dart
import 'package:flutter/material.dart';
|
|
|
|
ThemeData watchTheme() {
|
|
const background = Color(0xFF080A12);
|
|
const surface = Color(0xFF141824);
|
|
const text = Color(0xFFF5F1E8);
|
|
const muted = Color(0xFFA7ADBA);
|
|
const accent = Color(0xFFD72638);
|
|
|
|
final textTheme = Typography.whiteMountainView.copyWith(
|
|
labelSmall: const TextStyle(
|
|
fontFamily: 'Archivo',
|
|
fontSize: 10,
|
|
fontWeight: FontWeight.w800,
|
|
color: muted,
|
|
letterSpacing: 0,
|
|
),
|
|
bodySmall: const TextStyle(
|
|
fontFamily: 'Archivo',
|
|
fontSize: 11,
|
|
color: muted,
|
|
height: 1.15,
|
|
letterSpacing: 0,
|
|
),
|
|
bodyMedium: const TextStyle(
|
|
fontFamily: 'Archivo',
|
|
fontSize: 13,
|
|
color: text,
|
|
height: 1.15,
|
|
letterSpacing: 0,
|
|
),
|
|
titleSmall: const TextStyle(
|
|
fontFamily: 'Archivo',
|
|
fontSize: 16,
|
|
fontWeight: FontWeight.w800,
|
|
color: text,
|
|
height: 1.05,
|
|
letterSpacing: 0,
|
|
),
|
|
displayLarge: const TextStyle(
|
|
fontFamily: 'Anton',
|
|
fontSize: 42,
|
|
fontWeight: FontWeight.w400,
|
|
color: Color(0xFFC9A24A),
|
|
height: 0.95,
|
|
letterSpacing: 0,
|
|
fontFeatures: [FontFeature.tabularFigures()],
|
|
),
|
|
);
|
|
|
|
return ThemeData(
|
|
useMaterial3: true,
|
|
brightness: Brightness.dark,
|
|
scaffoldBackgroundColor: background,
|
|
colorScheme: const ColorScheme.dark(
|
|
primary: accent,
|
|
onPrimary: Colors.white,
|
|
secondary: Color(0xFFC9A24A),
|
|
surface: surface,
|
|
onSurface: text,
|
|
onSurfaceVariant: muted,
|
|
error: Color(0xFFFF4D5E),
|
|
),
|
|
textTheme: textTheme,
|
|
filledButtonTheme: FilledButtonThemeData(
|
|
style: FilledButton.styleFrom(
|
|
minimumSize: const Size.fromHeight(38),
|
|
padding: const EdgeInsets.symmetric(horizontal: 14, vertical: 10),
|
|
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)),
|
|
textStyle: textTheme.labelLarge?.copyWith(
|
|
fontFamily: 'Archivo',
|
|
fontSize: 13,
|
|
fontWeight: FontWeight.w800,
|
|
letterSpacing: 0,
|
|
),
|
|
),
|
|
),
|
|
outlinedButtonTheme: OutlinedButtonThemeData(
|
|
style: OutlinedButton.styleFrom(
|
|
minimumSize: const Size.fromHeight(38),
|
|
padding: const EdgeInsets.symmetric(horizontal: 14, vertical: 10),
|
|
side: const BorderSide(color: Color(0xFF303748)),
|
|
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)),
|
|
textStyle: textTheme.labelLarge?.copyWith(
|
|
fontFamily: 'Archivo',
|
|
fontSize: 13,
|
|
fontWeight: FontWeight.w800,
|
|
letterSpacing: 0,
|
|
),
|
|
),
|
|
),
|
|
);
|
|
}
|