buildHeader method
On web, the top header is replaced by a static bar, and the "regular" header is placed down within the card
Implementation
Widget? buildHeader(
BuildContext context,
PlatformLayoutInfo layoutInfo,
) {
if (widget.hideAppBar) return null;
return SliverPersistentHeader(
pinned: true,
delegate: FixedPinnedHeader(
child: Container(
decoration: BoxDecoration(
border: Border.symmetric(vertical: sunnyColors.g200.borderSide1),
color: Colors.white,
),
child: Layout.row().spaceBetween.noFlex.build([
Container(),
ConstrainedBox(
constraints: BoxConstraints(maxWidth: 880),
child: Layout.row().spaceBetween.build(
[
Align(alignment: Alignment.centerLeft, child: pageTitle),
if (widget.actions.orEmptyIter().isNotEmpty)
Align(
alignment: Alignment.centerRight,
child: Layout.row().noFlex.build(widget.actions),
),
],
),
),
Container(),
]),
),
fixedHeight: widget.headerHeight ?? SunnySpacing().appBarHeight,
),
);
}