2025-09-24 15:42:30 +08:00
|
|
|
import 'package:t_basic_intl/intl.dart';
|
2025-06-18 11:28:37 +08:00
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
|
|
|
|
|
class AppTheme {
|
2025-08-22 12:35:52 +08:00
|
|
|
|
|
|
|
|
static String _getLocaleAwareFontFamily() {
|
|
|
|
|
final isChinese = Intl.getCurrentLocale().startsWith('zh');
|
|
|
|
|
return isChinese ? 'HYQiHei_Regular' : 'VWHead_Regular';
|
|
|
|
|
}
|
|
|
|
|
|
2025-06-18 11:28:37 +08:00
|
|
|
static final ThemeData lightTheme = ThemeData(
|
|
|
|
|
primaryColor: const Color(0xFF6C63FF),
|
|
|
|
|
scaffoldBackgroundColor: Colors.white,
|
2025-08-22 12:35:52 +08:00
|
|
|
fontFamily: _getLocaleAwareFontFamily(),
|
2025-06-18 11:28:37 +08:00
|
|
|
colorScheme: ColorScheme.fromSeed(
|
|
|
|
|
seedColor: const Color(0xFF6C63FF),
|
|
|
|
|
brightness: Brightness.light,
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
static final ThemeData darkTheme = ThemeData(
|
|
|
|
|
primaryColor: const Color(0xFF6C63FF),
|
|
|
|
|
scaffoldBackgroundColor: const Color(0xFF121212),
|
2025-08-22 12:35:52 +08:00
|
|
|
fontFamily: _getLocaleAwareFontFamily(),
|
2025-06-18 11:28:37 +08:00
|
|
|
colorScheme: ColorScheme.fromSeed(
|
|
|
|
|
seedColor: const Color(0xFF6C63FF),
|
|
|
|
|
brightness: Brightness.dark,
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}
|