Files
flutter_server_box/lib/view/page/home/appbar.dart
lollipopkit🏳️‍⚧️ 00d303ac36 fix: editing pref store (#618)
2024-10-29 19:37:19 +08:00

26 lines
617 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,
child: isIOS
? const Center(child: Text(BuildData.name, style: UIs.text15Bold))
: null,
);
}
@override
Size get preferredSize {
final height = switch (Pfs.type) {
Pfs.macos => paddingTop + (CustomAppBar.sysStatusBarHeight ?? 0),
_ => paddingTop,
};
return Size.fromHeight(height);
}
}