build method
Builds either a static SliverStickyHeader or delegates to ExpansionBarSection
based on the expandable flag.
For static sections, it uses a Bar header with glass effects on pin state. For expandable ones, it leverages ExpansionBarSection for state management and animations, ensuring seamless integration with ArcaneTheme and sliver layouts like CustomScrollView.
Implementation
@override
Widget build(BuildContext context) => expandable
? ExpansionBarSection(
title: title,
subtitle: subtitle,
header: header,
titleText: titleText,
subtitleText: subtitleText,
headerText: headerText,
leading: leading,
trailing: trailing,
sliver: sliver,
backButton: backButton,
initiallyExpanded: initiallyExpanded,
)
: SliverStickyHeader.builder(
builder: (context, state) => Bar(
ignoreContextSignals: true,
useGlass: state.isPinned,
backButton: backButton,
title: title,
header: header,
subtitle: subtitle,
titleText: titleText,
subtitleText: subtitleText,
headerText: headerText,
leading: leading,
trailing: trailing,
),
sliver: sliver,
);