feat(tokens): add design tokens, type scale, push scaffold, and root nav state

This commit is contained in:
2026-07-28 20:01:23 +02:00
parent 6dba89432e
commit 172b2a42ac
17 changed files with 856 additions and 30 deletions
+17 -6
View File
@@ -3,16 +3,21 @@ import 'package:google_fonts/google_fonts.dart';
import 'pluriwave_motion.dart';
import 'pluriwave_tokens.dart';
import 'pluriwave_typography.dart';
abstract final class PluriWaveTheme {
static ThemeData dark() {
const tokens = PluriWaveTokens.dark;
final baseTextTheme = GoogleFonts.plusJakartaSansTextTheme(
ThemeData.dark().textTheme,
);
final typography = PluriWaveTypography.from(baseTextTheme);
final colorScheme = const ColorScheme.dark().copyWith(
primary: tokens.electricMagenta,
secondary: const Color(0xFF7EE4C2),
secondary: tokens.liveGreen,
tertiary: tokens.warmCoral,
surface: const Color(0xFF0D1B24),
surfaceContainerLow: const Color(0xFF102532),
surfaceContainerLow: tokens.listSurface,
surfaceContainerHighest: const Color(0xFF1B3942),
onSurface: const Color(0xFFF2F7FA),
onPrimary: Colors.white,
@@ -22,10 +27,12 @@ abstract final class PluriWaveTheme {
useMaterial3: true,
colorScheme: colorScheme,
scaffoldBackgroundColor: tokens.deepViolet,
textTheme: GoogleFonts.plusJakartaSansTextTheme(
ThemeData.dark().textTheme,
),
extensions: const <ThemeExtension<dynamic>>[tokens, PluriWaveMotion.dark],
textTheme: baseTextTheme,
extensions: <ThemeExtension<dynamic>>[
tokens,
PluriWaveMotion.dark,
typography,
],
appBarTheme: const AppBarTheme(
centerTitle: false,
backgroundColor: Colors.transparent,
@@ -69,4 +76,8 @@ extension PluriWaveThemeContextX on BuildContext {
PluriWaveMotion get pluriMotion =>
Theme.of(this).extension<PluriWaveMotion>() ?? PluriWaveMotion.dark;
PluriWaveTypography get pluriType =>
Theme.of(this).extension<PluriWaveTypography>() ??
PluriWaveTypography.from(Theme.of(this).textTheme);
}