feat: 保留系统开屏并更新品牌素材

This commit is contained in:
Zhou Weidong committed 2026-10-22 23:04:23 +08:00
1 parent 41bd4683c3
commit 345cc2ad28
56 files changed
+10 -53

No files matched your search

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.8 KiB

After

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.0 KiB

After

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.0 KiB

After

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 49 KiB

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.7 KiB

After

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 39 KiB

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 49 KiB

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 53 KiB

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.5 KiB

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.9 KiB

After

Width:  |  Height:  |  Size: 6.3 KiB

+1 -1
View File
@@ -4,4 +4,4 @@
<resources> <resources>
<color name="splash_background">#000000</color> <color name="splash_background">#000000</color>
<color name="ic_launcher_background">#FF6B2C</color> <color name="ic_launcher_background">#FF6B2C</color>
</resources> </resources>
Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 49 KiB

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 46 KiB

After

Width:  |  Height:  |  Size: 42 KiB

+1
View File
@@ -1318,3 +1318,4 @@ $ flutter test
- Launcher/Android 12 启动背景统一纯黑,自适应图标背景改为品牌橙。 - Launcher/Android 12 启动背景统一纯黑,自适应图标背景改为品牌橙。
- Android/iOS 图标与启动资源已重新生成;应用内开屏固定 splash_logo,宽 200 等比居中。 - Android/iOS 图标与启动资源已重新生成;应用内开屏固定 splash_logo,宽 200 等比居中。
- `flutter analyze`:No issues found。 - `flutter analyze`:No issues found。
- 移除 Flutter 内 `_startupSplash` 与 `startup-splash`,只保留系统原生开屏;最新斜体字标素材已重新生成。
Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 454 B

After

Width:  |  Height:  |  Size: 412 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 999 B

After

Width:  |  Height:  |  Size: 907 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 718 B

After

Width:  |  Height:  |  Size: 593 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 999 B

After

Width:  |  Height:  |  Size: 907 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.6 KiB

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.5 KiB

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.6 KiB

After

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.2 KiB

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 39 KiB

After

Width:  |  Height:  |  Size: 39 KiB

+1 -20
View File
@@ -43,8 +43,6 @@ class HomePage extends StatefulWidget {
} }
class _HomePageState extends State<HomePage> with WidgetsBindingObserver { class _HomePageState extends State<HomePage> with WidgetsBindingObserver {
static const _splashAsset = 'assets/icon/splash_logo.png';
bool _resumeRetryInFlight = false; bool _resumeRetryInFlight = false;
HomeFeedController? _homeFeed; HomeFeedController? _homeFeed;
bool _recommendSeeded = false; bool _recommendSeeded = false;
@@ -111,7 +109,7 @@ class _HomePageState extends State<HomePage> with WidgetsBindingObserver {
AppLocalizations l10n, AppLocalizations l10n,
) { ) {
if (catalog.loading) { if (catalog.loading) {
return catalog.settled ? _retryLoading() : _startupSplash(); return _retryLoading();
} }
if (catalog.error != null) { if (catalog.error != null) {
return Scaffold( return Scaffold(
@@ -158,23 +156,6 @@ class _HomePageState extends State<HomePage> with WidgetsBindingObserver {
} }
} }
Widget _startupSplash() {
return AnnotatedRegion<SystemUiOverlayStyle>(
value: SystemUiOverlayStyle.light,
child: ColoredBox(
color: AppColors.mediaBlack,
child: Center(
child: Image.asset(
_splashAsset,
key: const Key('startup-splash'),
width: 200,
fit: BoxFit.contain,
),
),
),
);
}
Widget _retryLoading() { Widget _retryLoading() {
return AnnotatedRegion<SystemUiOverlayStyle>( return AnnotatedRegion<SystemUiOverlayStyle>(
value: SystemUiOverlayStyle.light, value: SystemUiOverlayStyle.light,
+7 -32
View File
@@ -2,7 +2,6 @@
import 'dart:async'; import 'dart:async';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart'; import 'package:flutter_test/flutter_test.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
@@ -39,12 +38,11 @@ void main() {
}); });
tearDown(() { tearDown(() {
debugDefaultTargetPlatformOverride = null;
AppConfig.clearRuntimeBaseUrl(); AppConfig.clearRuntimeBaseUrl();
AppConfig.ready = Future<void>.value(); AppConfig.ready = Future<void>.value();
}); });
testWidgets('should_show_platform_startup_image_before_catalog_settles', ( testWidgets('should_show_loading_without_flutter_splash_before_settles', (
tester, tester,
) async { ) async {
final controller = CatalogController(_EmptyCatalogRepository()) final controller = CatalogController(_EmptyCatalogRepository())
@@ -52,33 +50,10 @@ void main() {
..settled = false; ..settled = false;
addTearDown(controller.dispose); addTearDown(controller.dispose);
for (final platform in [TargetPlatform.android, TargetPlatform.iOS]) { await _pumpHomePage(tester, controller);
debugDefaultTargetPlatformOverride = platform;
await _pumpHomePage(tester, controller);
final image = tester.widget<Image>( expect(find.byType(CircularProgressIndicator), findsOneWidget);
find.byKey(const Key('startup-splash')), expect(find.byKey(const Key('startup-splash')), findsNothing);
);
final expectedAsset = platform == TargetPlatform.android
? 'assets/icon/splash_logo_android12.png'
: 'assets/icon/splash_logo.png';
final expectedSize = platform == TargetPlatform.android ? 288.0 : 384.0;
expect(
image.image,
isA<AssetImage>().having(
(asset) => asset.assetName,
'assetName',
expectedAsset,
),
);
expect(
tester.getSize(find.byKey(const Key('startup-splash'))),
Size.square(expectedSize),
);
expect(find.byType(CircularProgressIndicator), findsNothing);
}
debugDefaultTargetPlatformOverride = null;
}); });
testWidgets('should_show_spinner_when_retry_loads_after_catalog_settled', ( testWidgets('should_show_spinner_when_retry_loads_after_catalog_settled', (
@@ -95,7 +70,7 @@ void main() {
expect(find.byKey(const Key('startup-splash')), findsNothing); expect(find.byKey(const Key('startup-splash')), findsNothing);
}); });
testWidgets('should_enter_home_and_remove_startup_image_when_data_is_ready', ( testWidgets('should_enter_home_after_loading_when_data_is_ready', (
tester, tester,
) async { ) async {
AppConfig.ready = Future<void>.value(); AppConfig.ready = Future<void>.value();
@@ -116,8 +91,8 @@ void main() {
); );
await tester.pump(); await tester.pump();
expect(find.byKey(const Key('startup-splash')), findsOneWidget); expect(find.byKey(const Key('startup-splash')), findsNothing);
expect(find.byType(CircularProgressIndicator), findsNothing); expect(find.byType(CircularProgressIndicator), findsOneWidget);
catalog.complete(_feed); catalog.complete(_feed);
await tester.pumpAndSettle(); await tester.pumpAndSettle();