Skip to content

Commit

Permalink
feat(theme): remove font family settings
Browse files Browse the repository at this point in the history
  • Loading branch information
realth000 committed Jan 1, 2025
1 parent d6a6a68 commit e6180da
Showing 1 changed file with 22 additions and 27 deletions.
49 changes: 22 additions & 27 deletions lib/themes/app_themes.dart
Original file line number Diff line number Diff line change
Expand Up @@ -33,32 +33,29 @@ class AppTheme {
drawerRadius: 0,
);

static CardTheme _buildCardTheme() =>
const CardTheme(
static CardTheme _buildCardTheme() => const CardTheme(
elevation: 0,
);

static ChipThemeData _buildChipTheme() =>
const ChipThemeData(
static ChipThemeData _buildChipTheme() => const ChipThemeData(
padding: EdgeInsets.all(2),
);

/// Global theme for [ListTile].
static ListTileThemeData _buildListTileTheme() =>
const ListTileThemeData(
static ListTileThemeData _buildListTileTheme() => const ListTileThemeData(
visualDensity: VisualDensity.standard,
contentPadding: EdgeInsets.symmetric(horizontal: 10),
horizontalTitleGap: 10,
);

/// Global theme for [TabBar].
static TabBarTheme _buildTabBarTheme() =>
const TabBarTheme(
static TabBarTheme _buildTabBarTheme() => const TabBarTheme(
dividerHeight: 0,
);

static NavigationDrawerThemeData _buildNavigationDrawerTheme(
ColorScheme? colorScheme,) =>
ColorScheme? colorScheme,
) =>
NavigationDrawerThemeData(
labelTextStyle: WidgetStateProperty.resolveWith((state) {
if (state.contains(WidgetState.selected)) {
Expand All @@ -81,17 +78,16 @@ class AppTheme {
seedScheme = ColorScheme.fromSeed(seedColor: seedColor);
}
return FlexThemeData.light(
fontFamily: 'Microsoft YaHei UI',
colors: seedScheme != null
? FlexSchemeColor(
primary: seedScheme.primary,
primaryContainer: seedScheme.primaryContainer,
secondary: seedScheme.secondary,
secondaryContainer: seedScheme.secondaryContainer,
tertiary: seedScheme.tertiary,
tertiaryContainer: seedScheme.tertiaryContainer,
error: seedScheme.error,
)
primary: seedScheme.primary,
primaryContainer: seedScheme.primaryContainer,
secondary: seedScheme.secondary,
secondaryContainer: seedScheme.secondaryContainer,
tertiary: seedScheme.tertiary,
tertiaryContainer: seedScheme.tertiaryContainer,
error: seedScheme.error,
)
: null,
scheme: seedColor == null ? FlexScheme.bahamaBlue : null,
tabBarStyle: FlexTabBarStyle.forBackground,
Expand Down Expand Up @@ -120,17 +116,16 @@ class AppTheme {
);
}
return FlexThemeData.dark(
fontFamily: '更纱黑体 UI SC',
colors: seedScheme != null
? FlexSchemeColor(
primary: seedScheme.primary,
primaryContainer: seedScheme.primaryContainer,
secondary: seedScheme.secondary,
secondaryContainer: seedScheme.secondaryContainer,
tertiary: seedScheme.tertiary,
tertiaryContainer: seedScheme.tertiaryContainer,
error: seedScheme.error,
)
primary: seedScheme.primary,
primaryContainer: seedScheme.primaryContainer,
secondary: seedScheme.secondary,
secondaryContainer: seedScheme.secondaryContainer,
tertiary: seedScheme.tertiary,
tertiaryContainer: seedScheme.tertiaryContainer,
error: seedScheme.error,
)
: null,
scheme: seedColor == null ? FlexScheme.bahamaBlue : null,
tabBarStyle: FlexTabBarStyle.forBackground,
Expand Down

0 comments on commit e6180da

Please sign in to comment.