mirror of
https://github.com/lollipopkit/flutter_server_box.git
synced 2025-12-17 07:14:28 +01:00
24 lines
497 B
Dart
24 lines
497 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,
|
|
_ => paddingTop,
|
|
};
|
|
return Size.fromHeight(height);
|
|
}
|
|
}
|