mirror of
https://github.com/lollipopkit/flutter_server_box.git
synced 2025-12-17 07:14:28 +01:00
26 lines
617 B
Dart
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);
|
|
}
|
|
} |