Files
2026-02-15 13:57:24 +01:00

59 lines
1.8 KiB
Dart

import 'package:flutter/material.dart';
/// Shared app theme, aligned with the visual tone of the reference templates.
class AppTheme {
AppTheme._();
static const Color background = Color(0xFFF3F6F8);
static const Color surface = Color(0xFFFFFFFF);
static const Color primary = Color(0xFF1E3541);
static const Color accent = Color(0xFF1AB6C8);
static const Color textPrimary = Color(0xFF18303A);
static const Color textSecondary = Color(0xFF58707A);
/// Builds the Material [ThemeData].
static ThemeData light() {
final ColorScheme colorScheme = ColorScheme.fromSeed(seedColor: primary);
final TextTheme textTheme = ThemeData.light().textTheme.apply(
fontFamily: 'WorkSans',
bodyColor: textPrimary,
displayColor: textPrimary,
);
return ThemeData(
useMaterial3: true,
colorScheme: colorScheme.copyWith(
primary: primary,
secondary: accent,
surface: surface,
),
scaffoldBackgroundColor: background,
textTheme: textTheme.copyWith(
headlineMedium: textTheme.headlineMedium?.copyWith(
fontWeight: FontWeight.w700,
letterSpacing: 0.1,
),
titleLarge: textTheme.titleLarge?.copyWith(
fontWeight: FontWeight.w700,
letterSpacing: 0.1,
),
titleMedium: textTheme.titleMedium?.copyWith(
fontWeight: FontWeight.w600,
),
),
appBarTheme: const AppBarTheme(
centerTitle: false,
backgroundColor: Colors.transparent,
foregroundColor: textPrimary,
elevation: 0,
),
cardTheme: CardThemeData(
color: surface,
elevation: 0,
margin: EdgeInsets.zero,
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(24)),
),
);
}
}