Signed-off-by: dom <githubaccount56556@proton.me>
This commit is contained in:
dom
2026-03-09 11:53:46 +08:00
parent 5586d12b1f
commit 702cf988d3
2 changed files with 37 additions and 40 deletions

View File

@@ -311,45 +311,41 @@ class _DynamicSliverAppBarState extends State<DynamicSliverAppBar> {
final double effectiveCollapsedHeight =
topPadding + kToolbarHeight + bottomHeight + 1;
return MediaQuery.removePadding(
context: context,
removeBottom: true,
child: SliverPinnedHeader(
onPerformLayout: widget.onPerformLayout,
delegate: _SliverAppBarDelegate(
leading: widget.leading,
automaticallyImplyLeading: widget.automaticallyImplyLeading,
title: widget.title,
actions: widget.actions,
automaticallyImplyActions: widget.automaticallyImplyActions,
flexibleSpace: widget.flexibleSpace,
bottom: widget.bottom,
elevation: widget.elevation,
scrolledUnderElevation: widget.scrolledUnderElevation,
shadowColor: widget.shadowColor,
surfaceTintColor: widget.surfaceTintColor,
forceElevated: widget.forceElevated,
backgroundColor: widget.backgroundColor,
foregroundColor: widget.foregroundColor,
iconTheme: widget.iconTheme,
actionsIconTheme: widget.actionsIconTheme,
primary: widget.primary,
centerTitle: widget.centerTitle,
excludeHeaderSemantics: widget.excludeHeaderSemantics,
titleSpacing: widget.titleSpacing,
collapsedHeight: effectiveCollapsedHeight,
topPadding: topPadding,
shape: widget.shape,
toolbarHeight: kToolbarHeight,
leadingWidth: widget.leadingWidth,
toolbarTextStyle: widget.toolbarTextStyle,
titleTextStyle: widget.titleTextStyle,
systemOverlayStyle: widget.systemOverlayStyle,
forceMaterialTransparency: widget.forceMaterialTransparency,
useDefaultSemanticsOrder: widget.useDefaultSemanticsOrder,
clipBehavior: widget.clipBehavior,
actionsPadding: widget.actionsPadding,
),
return SliverPinnedHeader(
onPerformLayout: widget.onPerformLayout,
delegate: _SliverAppBarDelegate(
leading: widget.leading,
automaticallyImplyLeading: widget.automaticallyImplyLeading,
title: widget.title,
actions: widget.actions,
automaticallyImplyActions: widget.automaticallyImplyActions,
flexibleSpace: widget.flexibleSpace,
bottom: widget.bottom,
elevation: widget.elevation,
scrolledUnderElevation: widget.scrolledUnderElevation,
shadowColor: widget.shadowColor,
surfaceTintColor: widget.surfaceTintColor,
forceElevated: widget.forceElevated,
backgroundColor: widget.backgroundColor,
foregroundColor: widget.foregroundColor,
iconTheme: widget.iconTheme,
actionsIconTheme: widget.actionsIconTheme,
primary: widget.primary,
centerTitle: widget.centerTitle,
excludeHeaderSemantics: widget.excludeHeaderSemantics,
titleSpacing: widget.titleSpacing,
collapsedHeight: effectiveCollapsedHeight,
topPadding: topPadding,
shape: widget.shape,
toolbarHeight: kToolbarHeight,
leadingWidth: widget.leadingWidth,
toolbarTextStyle: widget.toolbarTextStyle,
titleTextStyle: widget.titleTextStyle,
systemOverlayStyle: widget.systemOverlayStyle,
forceMaterialTransparency: widget.forceMaterialTransparency,
useDefaultSemanticsOrder: widget.useDefaultSemanticsOrder,
clipBehavior: widget.clipBehavior,
actionsPadding: widget.actionsPadding,
),
);
}