fix: editing pref store (#618)

This commit is contained in:
lollipopkit🏳️‍⚧️
2024-10-29 19:37:19 +08:00
committed by GitHub
parent 229983d82e
commit 00d303ac36
4 changed files with 35 additions and 97 deletions

View File

@@ -8,7 +8,7 @@ final class _AppBar extends StatelessWidget implements PreferredSizeWidget {
@override
Widget build(BuildContext context) {
return SizedBox(
height: paddingTop,
height: preferredSize.height,
child: isIOS
? const Center(child: Text(BuildData.name, style: UIs.text15Bold))
: null,
@@ -16,5 +16,11 @@ final class _AppBar extends StatelessWidget implements PreferredSizeWidget {
}
@override
Size get preferredSize => Size.fromHeight(paddingTop);
}
Size get preferredSize {
final height = switch (Pfs.type) {
Pfs.macos => paddingTop + (CustomAppBar.sysStatusBarHeight ?? 0),
_ => paddingTop,
};
return Size.fromHeight(height);
}
}