Commit 6d777e6283ba92b8037912673815a919c5899398

Authored by 权海
1 parent 1a793440

feat(ui):指定苹方字体

... ... @@ -36,6 +36,7 @@
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
customLLDBInitFile = "$(SRCROOT)/Flutter/ephemeral/flutter_lldbinit"
language = "en"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
... ...
... ... @@ -42,7 +42,7 @@ class TrendDateRangeBar extends StatelessWidget {
Text(
controller.dateRangeLabel,
style: const TextStyle(
fontFamily: 'PingFang SC',
fontFamily: 'PingFangSC',
fontSize: 14,
fontWeight: FontWeight.w500,
color: _brandColor,
... ...
... ... @@ -56,7 +56,7 @@ class TrendPeriodTabBar extends StatelessWidget {
child: AnimatedDefaultTextStyle(
duration: const Duration(milliseconds: 200),
style: TextStyle(
fontFamily: 'PingFang SC',
fontFamily: 'PingFangSC',
fontSize: 14,
fontWeight: FontWeight.w500,
color: isSelected ? _h1 : _h2,
... ...
... ... @@ -32,12 +32,12 @@ class TrendTypeTabBar extends StatelessWidget {
labelColor: _selectedColor,
unselectedLabelColor: _unselectedColor,
labelStyle: const TextStyle(
fontFamily: 'PingFang SC',
fontFamily: 'PingFangSC',
fontSize: 18,
fontWeight: FontWeight.w600,
),
unselectedLabelStyle: const TextStyle(
fontFamily: 'PingFang SC',
fontFamily: 'PingFangSC',
fontSize: 18,
fontWeight: FontWeight.w500,
),
... ...
... ... @@ -53,6 +53,7 @@ class ReportDateSwitcher extends StatelessWidget {
fontSize: 14,
fontWeight: FontWeight.w500,
height: 1.2,
fontFamily: 'PingFangSC',
),
),
const SizedBox(width: 2),
... ...
... ... @@ -17,7 +17,7 @@ abstract final class SleepReportTextStyles {
);
if (!_usesAppleTextRenderer) return baseStyle;
return baseStyle.copyWith(
fontFamily: 'PingFang SC',
fontFamily: 'PingFangSC',
fontFamilyFallback: const ['Heiti SC', 'Arial Unicode MS'],
);
}
... ... @@ -31,7 +31,7 @@ abstract final class SleepReportTextStyles {
}
return const StrutStyle(
fontSize: 16,
fontFamily: 'PingFang SC',
fontFamily: 'PingFangSC',
fontFamilyFallback: ['Heiti SC', 'Arial Unicode MS'],
height: 1.2,
);
... ...
... ... @@ -8,7 +8,7 @@ import 'app_colors_extension.dart';
class AppTheme {
AppTheme._();
static String? get _platformFontFamily =>
defaultTargetPlatform == TargetPlatform.iOS ? 'PingFang SC' : null;
defaultTargetPlatform == TargetPlatform.iOS ? 'PingFangSC' : null;
static const systemUiOverlayStyle = SystemUiOverlayStyle(
statusBarColor: Colors.transparent,
... ...
... ... @@ -2,6 +2,8 @@ import 'package:flutter/widgets.dart';
Locale resolveAppLocale(
Locale? deviceLocale, Iterable<Locale> supportedLocales) {
return const Locale('en');
if (deviceLocale == null) return const Locale('en');
for (final locale in supportedLocales) {
... ...