fix: 启动页遮住登录/首页初始态,消除深色模式黑闪
- 新增 SplashPage + appReadyProvider/_BootGate:启动闸门将启动页覆盖在最上层, 直到 auth 判定完成且今日健康卡数据就绪,遮住登录页闪现与首页对话流初始态 - auth 初始状态改为 isLoading=true,无 token 时再置 false - values-night/styles.xml 改为亮色白底,消除深色模式下 Flutter 初始化期间的黑色窗口背景 - 带 8 秒安全兜底,避免离线时卡在启动页
This commit is contained in:
20
health_app/lib/pages/splash_page.dart
Normal file
20
health_app/lib/pages/splash_page.dart
Normal file
@@ -0,0 +1,20 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
/// 启动页——盖在整个 App 最上层,直到「今日健康卡片」数据就绪后才撤掉,
|
||||
/// 用于遮住启动期间的登录页闪现与首页对话流初始态。始终亮色白底。
|
||||
class SplashPage extends StatelessWidget {
|
||||
const SplashPage({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return const ColoredBox(
|
||||
color: Colors.white,
|
||||
child: Center(
|
||||
child: Image(
|
||||
image: AssetImage('assets/branding/health_splash_master.png'),
|
||||
fit: BoxFit.contain,
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user