feat: 修改bug

This commit is contained in:
2025-11-27 03:10:47 -08:00
parent 4fdf4da4f3
commit 569f9f6d05
8 changed files with 56 additions and 70 deletions
+7 -4
View File
@@ -42,6 +42,8 @@ class HIBaseScaffold extends StatelessWidget {
/// 是否显示背景图
final bool showBackgroundImage;
final Color? backgroundColor;
/// resizeToAvoidBottomInset
final bool? resizeToAvoidBottomInset;
@@ -59,6 +61,7 @@ class HIBaseScaffold extends StatelessWidget {
this.showBackgroundImage = true,
this.topContentAreaHeight = 120.0,
this.resizeToAvoidBottomInset = false,
this.backgroundColor,
});
@override
@@ -71,7 +74,7 @@ class HIBaseScaffold extends StatelessWidget {
resizeToAvoidBottomInset: resizeToAvoidBottomInset,
backgroundColor: showBackgroundImage
? Colors.transparent
: Theme.of(context).scaffoldBackgroundColor,
: (backgroundColor ?? Theme.of(context).scaffoldBackgroundColor),
appBar: AppBar(
backgroundColor: Colors.transparent,
toolbarHeight: 0.0,
@@ -152,7 +155,7 @@ class HIBaseScaffold extends StatelessWidget {
if (title != null || subtitle != null)
Positioned(
top: topPadding +
(showBack ? 12.w : 20.w), // 顶部空出状态栏高度,并根据是否有返回按钮调整间距
(showBack ? 8 : 20), // 顶部空出状态栏高度,并根据是否有返回按钮调整间距
left: 0,
right: 0,
child: Column(
@@ -164,7 +167,7 @@ class HIBaseScaffold extends StatelessWidget {
title!,
style: TextStyle(
color: Colors.black, // 在深色背景下使用白色
fontSize: 24.sp,
fontSize: 24,
fontWeight: FontWeight.bold,
),
),
@@ -175,7 +178,7 @@ class HIBaseScaffold extends StatelessWidget {
subtitle!,
style: TextStyle(
color: Colors.black, // 副标题使用带透明度的白色
fontSize: 14.sp,
fontSize: 14,
fontWeight: FontWeight.w100,
),
),