Skip to content

Commit

Permalink
Roll back the Flutter version to resolve text rendering issues on som…
Browse files Browse the repository at this point in the history
…e Android systems.
  • Loading branch information
3003h committed Oct 30, 2024
1 parent 5e087cc commit 4ebcb3c
Show file tree
Hide file tree
Showing 12 changed files with 100 additions and 118 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ concurrency:

env:
PACKAGE_NAME: Eros-FE
FLUTTER_VERSION: "3.22.x"

jobs:
Build_and_upload:
Expand All @@ -30,32 +31,32 @@ jobs:
include:
- target: android
os: ubuntu-latest
flutter_version: "3.x"
flutter_version: ${{ env.FLUTTER_VERSION }}
flutter_channel: stable
artifact_name: release-apk
artifact_path: build/app/outputs/apk/release/Eros-FE*.apk
- target: ios
os: macos-14
flutter_version: "3.x"
flutter_version: ${{ env.FLUTTER_VERSION }}
flutter_channel: stable
artifact_name: release-ios
artifact_path: build/**/Eros-FE*.ipa
- target: ios
suffix: -canvas
os: macos-14
flutter_version: "3.x"
flutter_version: ${{ env.FLUTTER_VERSION }}
flutter_channel: stable
artifact_name: release-ios-canvas
artifact_path: build/**/Eros-FE*.ipa
- target: macos
os: macos-14
flutter_version: "3.x"
flutter_version: ${{ env.FLUTTER_VERSION }}
flutter_channel: stable
artifact_name: release-mac
artifact_path: build/macos/Eros-FE*.zip
- target: windows
os: windows-latest
flutter_version: "3.x"
flutter_version: ${{ env.FLUTTER_VERSION }}
flutter_channel: stable
artifact_name: release-windows
artifact_path: build/windows/Eros-FE*.zip
Expand Down
6 changes: 3 additions & 3 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@
<meta-data
android:name="flutterEmbedding"
android:value="2"/>
<meta-data
android:name="io.flutter.embedding.android.EnableImpeller"
android:value="false" />
<!-- <meta-data-->
<!-- android:name="io.flutter.embedding.android.EnableImpeller"-->
<!-- android:value="true" />-->

<provider
android:name="androidx.core.content.FileProvider"
Expand Down
1 change: 1 addition & 0 deletions ios/.fvm/flutter_sdk
4 changes: 4 additions & 0 deletions ios/.fvm/fvm_config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"flutterSdkVersion": "3.22.3",
"flavors": {}
}
4 changes: 2 additions & 2 deletions lib/common/service/theme_service.dart
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ class ThemeService extends ProfileService {
case ThemesModeEnum.system:
return platformBrightness.value == Brightness.dark
? _getDarkTheme
: ThemeColors.ligthTheme;
: ThemeColors.lightTheme;
case ThemesModeEnum.lightMode:
return ThemeColors.ligthTheme;
return ThemeColors.lightTheme;
case ThemesModeEnum.darkMode:
return _getDarkTheme;
default:
Expand Down
7 changes: 5 additions & 2 deletions lib/const/const.dart
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@ class EHConst {
'vietnamese': 'VI',
};

static const String fontFamily = 'miui';
static const String fontFamily = 'MiSans';

static final List<String> fontFamilyFallback = GetPlatform.isIOS
? [
Expand All @@ -472,7 +472,10 @@ class EHConst {
'Heiti SC',
]
: [
// 'miui',
'MiSans',
'HarmonyOSSans',
'OPPO Sans',
'miui',
'Inter',
'Source Han Sans SC VF',
'Noto Sans CJK SC',
Expand Down
18 changes: 9 additions & 9 deletions lib/const/theme_colors.dart
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import 'package:chinese_font_library/chinese_font_library.dart';
import 'package:eros_fe/common/colors.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter_boring_avatars/flutter_boring_avatars.dart';

import 'const.dart';

final ehTextTheme = const CupertinoTextThemeData().copyWith(
textStyle: const CupertinoTextThemeData().textStyle.copyWith(
// fontFamily: EHConst.fontFamily,
fontFamilyFallback: EHConst.fontFamilyFallback,
),
// textStyle: const CupertinoTextThemeData().textStyle.copyWith(
// // fontFamily: EHConst.fontFamily,
// fontFamilyFallback: EHConst.fontFamilyFallback,
// ),
textStyle: const CupertinoTextThemeData().textStyle.useSystemChineseFont(),
);

enum ThemesModeEnum {
Expand All @@ -17,7 +17,7 @@ enum ThemesModeEnum {
darkMode,
}

class CustTheme {
class CustomTheme {
late CupertinoThemeData themeData;
}

Expand Down Expand Up @@ -178,15 +178,15 @@ class ThemeColors {

/// 主题配置
/// 浅色主题
static CupertinoThemeData ligthTheme = CupertinoThemeData(
static CupertinoThemeData lightTheme = CupertinoThemeData(
brightness: Brightness.light,
barBackgroundColor: navigationBarBackground,
textTheme: ehTextTheme,
// scaffoldBackgroundColor: CupertinoColors.secondarySystemBackground,
);

/// 浅色主题
static CupertinoThemeData ligthThemeSecondary = CupertinoThemeData(
static CupertinoThemeData lightThemeSecondary = CupertinoThemeData(
brightness: Brightness.light,
barBackgroundColor: navigationBarBackground,
scaffoldBackgroundColor: CupertinoColors.secondarySystemBackground,
Expand Down
2 changes: 1 addition & 1 deletion macos/Flutter/GeneratedPluginRegistrant.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import path_provider_foundation
import sentry_flutter
import share_plus
import shared_preferences_foundation
import sqflite_darwin
import sqflite
import url_launcher_macos
import wakelock_plus
import window_size
Expand Down
Loading

0 comments on commit 4ebcb3c

Please sign in to comment.