99 lines
2.6 KiB
Dart
99 lines
2.6 KiB
Dart
import 'package:flutter/material.dart';
|
|
|
|
import 'wise_tokens.dart';
|
|
|
|
ThemeData buildAppTheme() {
|
|
final scheme = ColorScheme.fromSeed(
|
|
seedColor: WiseColors.primary,
|
|
primary: WiseColors.primary,
|
|
secondary: WiseColors.secondary,
|
|
tertiary: WiseColors.accent,
|
|
surface: WiseColors.surface,
|
|
);
|
|
return ThemeData(
|
|
useMaterial3: true,
|
|
colorScheme: scheme,
|
|
fontFamily: 'Inter',
|
|
scaffoldBackgroundColor: WiseColors.canvas,
|
|
appBarTheme: const AppBarTheme(
|
|
backgroundColor: WiseColors.canvas,
|
|
foregroundColor: WiseColors.primary,
|
|
elevation: 0,
|
|
centerTitle: false,
|
|
titleTextStyle: TextStyle(
|
|
color: WiseColors.primary,
|
|
fontSize: 22,
|
|
fontWeight: FontWeight.w800,
|
|
),
|
|
),
|
|
cardTheme: const CardThemeData(
|
|
color: WiseColors.surface,
|
|
elevation: 0,
|
|
margin: EdgeInsets.zero,
|
|
shape: RoundedRectangleBorder(
|
|
borderRadius: BorderRadius.all(Radius.circular(WiseRadius.md)),
|
|
),
|
|
),
|
|
navigationBarTheme: NavigationBarThemeData(
|
|
backgroundColor: WiseColors.surface,
|
|
indicatorColor: WiseColors.secondary200,
|
|
labelTextStyle: WidgetStateProperty.resolveWith(
|
|
(states) => TextStyle(
|
|
color: states.contains(WidgetState.selected)
|
|
? WiseColors.primary
|
|
: WiseColors.textTertiary,
|
|
fontSize: 11,
|
|
fontWeight: FontWeight.w700,
|
|
),
|
|
),
|
|
iconTheme: WidgetStateProperty.resolveWith(
|
|
(states) => IconThemeData(
|
|
color: states.contains(WidgetState.selected)
|
|
? WiseColors.primary
|
|
: WiseColors.textTertiary,
|
|
),
|
|
),
|
|
),
|
|
textTheme: const TextTheme(
|
|
headlineSmall: TextStyle(
|
|
color: WiseColors.ink,
|
|
fontSize: 26,
|
|
height: 1.18,
|
|
fontWeight: FontWeight.w800,
|
|
),
|
|
titleLarge: TextStyle(
|
|
color: WiseColors.ink,
|
|
fontSize: 21,
|
|
height: 1.22,
|
|
fontWeight: FontWeight.w800,
|
|
),
|
|
titleMedium: TextStyle(
|
|
color: WiseColors.ink,
|
|
fontSize: 17,
|
|
height: 1.25,
|
|
fontWeight: FontWeight.w800,
|
|
),
|
|
bodyLarge: TextStyle(
|
|
color: WiseColors.ink,
|
|
fontSize: 16,
|
|
height: 1.55,
|
|
),
|
|
bodyMedium: TextStyle(
|
|
color: WiseColors.ink700,
|
|
fontSize: 14,
|
|
height: 1.5,
|
|
),
|
|
bodySmall: TextStyle(
|
|
color: WiseColors.textSecondary,
|
|
fontSize: 12,
|
|
height: 1.45,
|
|
),
|
|
labelSmall: TextStyle(
|
|
color: WiseColors.textSecondary,
|
|
fontSize: 11,
|
|
fontWeight: FontWeight.w700,
|
|
),
|
|
),
|
|
);
|
|
}
|