Files
flutter_server_box/lib/view/page/home/appbar.dart
lollipopkit🏳️‍⚧️ 24d64b835d opt.: app bar
Fixes #727
2025-03-20 20:20:13 +08:00

24 lines
504 B
Dart

part of 'home.dart';
final class _AppBar extends StatelessWidget implements PreferredSizeWidget {
final double paddingTop;
const _AppBar(this.paddingTop);
@override
Widget build(BuildContext context) {
return SizedBox(
height: preferredSize.height,
);
}
@override
Size get preferredSize {
final height = switch (Pfs.type) {
Pfs.macos => paddingTop + (CustomAppBar.sysStatusBarHeight ?? 0),
_ => paddingTop,
};
return Size.fromHeight(height);
}
}