init
This commit is contained in:
commit
d205277cdd
182 changed files with 22978 additions and 0 deletions
52
lib/theme/app_theme.dart
Normal file
52
lib/theme/app_theme.dart
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
|
||||
import 'tokens.dart';
|
||||
|
||||
/// Builds the app [ThemeData] from the Ratune tokens.
|
||||
///
|
||||
/// Monospace type is core to the identity — every surface uses JetBrains Mono
|
||||
/// (a close analog to the terminal fonts in Ratune's screenshots). The [accent]
|
||||
/// is passed in so the theme rebuilds when album-art extraction changes it.
|
||||
ThemeData buildRatuneTheme(Color accent) {
|
||||
final mono = GoogleFonts.jetBrainsMonoTextTheme(
|
||||
ThemeData.dark().textTheme,
|
||||
).apply(
|
||||
bodyColor: RatuneColors.foreground,
|
||||
displayColor: RatuneColors.foreground,
|
||||
);
|
||||
|
||||
final scheme = ColorScheme.fromSeed(
|
||||
seedColor: accent,
|
||||
brightness: Brightness.dark,
|
||||
surface: RatuneColors.surface,
|
||||
).copyWith(
|
||||
primary: accent,
|
||||
secondary: accent,
|
||||
onSurface: RatuneColors.foreground,
|
||||
);
|
||||
|
||||
return ThemeData(
|
||||
useMaterial3: true,
|
||||
brightness: Brightness.dark,
|
||||
scaffoldBackgroundColor: RatuneColors.background,
|
||||
canvasColor: RatuneColors.background,
|
||||
colorScheme: scheme,
|
||||
textTheme: mono,
|
||||
primaryTextTheme: mono,
|
||||
dividerColor: RatuneColors.border,
|
||||
splashFactory: NoSplash.splashFactory,
|
||||
highlightColor: Colors.transparent,
|
||||
// Keep chrome flat and quiet — the content (and accent) carry the look.
|
||||
appBarTheme: const AppBarTheme(
|
||||
backgroundColor: RatuneColors.background,
|
||||
surfaceTintColor: Colors.transparent,
|
||||
elevation: 0,
|
||||
centerTitle: false,
|
||||
),
|
||||
listTileTheme: const ListTileThemeData(
|
||||
dense: true,
|
||||
minVerticalPadding: RatuneSpacing.sm,
|
||||
),
|
||||
);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue