add fonts
This commit is contained in:
@@ -1,10 +1,17 @@
|
||||
import 'package:basic_intl/intl.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class AppTheme {
|
||||
|
||||
static String _getLocaleAwareFontFamily() {
|
||||
final isChinese = Intl.getCurrentLocale().startsWith('zh');
|
||||
return isChinese ? 'HYQiHei_Regular' : 'VWHead_Regular';
|
||||
}
|
||||
|
||||
static final ThemeData lightTheme = ThemeData(
|
||||
primaryColor: const Color(0xFF6C63FF),
|
||||
scaffoldBackgroundColor: Colors.white,
|
||||
fontFamily: 'Roboto',
|
||||
fontFamily: _getLocaleAwareFontFamily(),
|
||||
colorScheme: ColorScheme.fromSeed(
|
||||
seedColor: const Color(0xFF6C63FF),
|
||||
brightness: Brightness.light,
|
||||
@@ -14,7 +21,7 @@ class AppTheme {
|
||||
static final ThemeData darkTheme = ThemeData(
|
||||
primaryColor: const Color(0xFF6C63FF),
|
||||
scaffoldBackgroundColor: const Color(0xFF121212),
|
||||
fontFamily: 'Roboto',
|
||||
fontFamily: _getLocaleAwareFontFamily(),
|
||||
colorScheme: ColorScheme.fromSeed(
|
||||
seedColor: const Color(0xFF6C63FF),
|
||||
brightness: Brightness.dark,
|
||||
|
||||
Reference in New Issue
Block a user