Build APK / build (push) Successful in 2m49s
- backend: GET /api/containers (liste lisible), POST/DELETE /api/servers (serveurs custom persistés en /data/servers.json, mergés aux intégrés), champ custom dans le statut. - app: écran AddServer (form + sélecteur multi-conteneurs filtrable), FAB Ajouter, suppression depuis le détail (serveurs custom only). - thème: palette flamme/chaud sombre (anthracite + orange→rouge), remplace le Material violet/teal par défaut (scaffold, appbar, tabs, boutons, FAB, champs). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
129 lines
4.6 KiB
Dart
129 lines
4.6 KiB
Dart
import 'package:flutter/material.dart';
|
|
|
|
/// Thème « flamme / chaud sombre » — anthracite + accents orange→rouge.
|
|
/// Remplace la palette Material par défaut (violet/teal).
|
|
class AppTheme {
|
|
// Palette
|
|
static const bg = Color(0xFF14110F); // fond anthracite
|
|
static const surface1 = Color(0xFF1F1B18); // cartes / champs
|
|
static const surface2 = Color(0xFF262119); // éléments surélevés
|
|
static const flame = Color(0xFFFF7A18); // orange accent
|
|
static const ember = Color(0xFFFF3D00); // rouge braise
|
|
static const ink = Color(0xFFF5EFE9); // texte principal
|
|
static const inkMuted = Color(0xFFA89F97); // texte secondaire
|
|
|
|
static ThemeData light() => dark(); // app pensée sombre → même thème
|
|
static ThemeData dark() {
|
|
const scheme = ColorScheme(
|
|
brightness: Brightness.dark,
|
|
primary: flame,
|
|
onPrimary: Color(0xFF230F00),
|
|
primaryContainer: Color(0xFF3A2410),
|
|
onPrimaryContainer: Color(0xFFFFD9B8),
|
|
secondary: ember,
|
|
onSecondary: Colors.white,
|
|
secondaryContainer: Color(0xFF4A1A0A),
|
|
onSecondaryContainer: Color(0xFFFFD5C8),
|
|
tertiary: Color(0xFFFFB74D),
|
|
onTertiary: Color(0xFF241400),
|
|
error: Color(0xFFFF6B5E),
|
|
onError: Color(0xFF3A0A05),
|
|
surface: bg,
|
|
onSurface: ink,
|
|
surfaceContainerLowest: Color(0xFF0F0D0B),
|
|
surfaceContainerLow: surface1,
|
|
surfaceContainer: surface1,
|
|
surfaceContainerHigh: surface2,
|
|
surfaceContainerHighest: Color(0xFF2E2820),
|
|
onSurfaceVariant: inkMuted,
|
|
outline: Color(0xFF4A433D),
|
|
outlineVariant: Color(0xFF332E29),
|
|
inverseSurface: ink,
|
|
onInverseSurface: bg,
|
|
shadow: Colors.black,
|
|
scrim: Colors.black,
|
|
);
|
|
|
|
return ThemeData(
|
|
useMaterial3: true,
|
|
colorScheme: scheme,
|
|
scaffoldBackgroundColor: bg,
|
|
canvasColor: bg,
|
|
appBarTheme: const AppBarTheme(
|
|
backgroundColor: bg,
|
|
foregroundColor: ink,
|
|
centerTitle: false,
|
|
elevation: 0,
|
|
scrolledUnderElevation: 0,
|
|
titleTextStyle: TextStyle(
|
|
color: ink,
|
|
fontSize: 24,
|
|
fontWeight: FontWeight.w800,
|
|
letterSpacing: -0.5,
|
|
),
|
|
),
|
|
cardTheme: CardTheme(
|
|
color: surface1,
|
|
clipBehavior: Clip.antiAlias,
|
|
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(22)),
|
|
elevation: 0,
|
|
),
|
|
tabBarTheme: const TabBarTheme(
|
|
labelColor: flame,
|
|
unselectedLabelColor: inkMuted,
|
|
indicatorColor: flame,
|
|
dividerColor: Colors.transparent,
|
|
labelStyle: TextStyle(fontWeight: FontWeight.w700),
|
|
),
|
|
filledButtonTheme: FilledButtonThemeData(
|
|
style: FilledButton.styleFrom(
|
|
backgroundColor: flame,
|
|
foregroundColor: const Color(0xFF230F00),
|
|
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(16)),
|
|
padding: const EdgeInsets.symmetric(horizontal: 22, vertical: 14),
|
|
textStyle: const TextStyle(fontWeight: FontWeight.w700, fontSize: 15),
|
|
),
|
|
),
|
|
outlinedButtonTheme: OutlinedButtonThemeData(
|
|
style: OutlinedButton.styleFrom(
|
|
foregroundColor: ink,
|
|
side: const BorderSide(color: Color(0xFF4A433D)),
|
|
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(16)),
|
|
),
|
|
),
|
|
floatingActionButtonTheme: const FloatingActionButtonThemeData(
|
|
backgroundColor: flame,
|
|
foregroundColor: Color(0xFF230F00),
|
|
),
|
|
inputDecorationTheme: InputDecorationTheme(
|
|
filled: true,
|
|
fillColor: surface1,
|
|
border: OutlineInputBorder(
|
|
borderRadius: BorderRadius.circular(14),
|
|
borderSide: BorderSide.none,
|
|
),
|
|
enabledBorder: OutlineInputBorder(
|
|
borderRadius: BorderRadius.circular(14),
|
|
borderSide: const BorderSide(color: Color(0xFF332E29)),
|
|
),
|
|
focusedBorder: OutlineInputBorder(
|
|
borderRadius: BorderRadius.circular(14),
|
|
borderSide: const BorderSide(color: flame, width: 2),
|
|
),
|
|
labelStyle: const TextStyle(color: inkMuted),
|
|
),
|
|
progressIndicatorTheme: const ProgressIndicatorThemeData(
|
|
color: flame,
|
|
linearTrackColor: Color(0xFF332E29),
|
|
),
|
|
dividerTheme: const DividerThemeData(color: Color(0xFF332E29)),
|
|
snackBarTheme: const SnackBarThemeData(
|
|
backgroundColor: surface2,
|
|
contentTextStyle: TextStyle(color: ink),
|
|
),
|
|
dialogTheme: const DialogTheme(backgroundColor: surface1),
|
|
chipTheme: const ChipThemeData(backgroundColor: surface2),
|
|
);
|
|
}
|
|
}
|