Skip to content

Commit

Permalink
feat: macos debug mode alway use LXGW font
Browse files Browse the repository at this point in the history
  • Loading branch information
d1y committed Jun 5, 2023
1 parent 93d8196 commit 4000d44
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,15 @@ import 'package:movie/utils/helper.dart';
import 'app/routes/app_pages.dart';
import 'utils/http.dart';

const kStandWenKaiFontName = "LXGW WenKai";

ThemeData applyTheme({isDark = true}) {
var theme = isDark ? ThemeData.dark() : ThemeData.light();
if (GetPlatform.isLinux || kDebugMode) {
theme = theme.copyWith(
textTheme: const TextTheme(
textTheme: TextTheme(
bodyMedium: TextStyle(
fontFamily: 'LXG',
fontFamily: GetPlatform.isMacOS ? kStandWenKaiFontName : 'LXG',
),
),
);
Expand Down

0 comments on commit 4000d44

Please sign in to comment.