Skip to content
pubscout

sliver_sticky_collapsable_panel

5.0.1, released 8 months ago by an unverified publisher

A Sliver implementation of a sticky collapsible panel with a box header and sliver child.

WASM-ready
$ flutter pub add sliver_sticky_collapsable_panel
Source repository

What it does

Provides a Flutter Sliver widget that renders a sticky header and a collapsible panel content. It supports expanding and collapsing headers via commands or user interactions, custom animations, iOS-style sticky headers, and layout performance optimizations.

AI-written summary of version 5.0.1, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need sticky headers that can collapse or expand inside a CustomScrollView.
  • You want an iOS-style contact list sticky header behavior.

Skip it when

  • Your scroll layout does not use Slivers or CustomScrollView.
  • You only need standard non-collapsible sticky headers and prefer simpler alternatives.

Strengths

  • Pure Dart implementation relying only on the Flutter framework.
  • Supports both declarative and command-style control for expanding and collapsing.
  • Includes performance options like optional fixed header size configuration.

Weaknesses

  • Limited to sliver-based layouts.
  • Requires managing specific controller keys and states for programmatic control.

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
0

No native setup or extra dependencies required.

CustomScrollView(
  controller: _scrollController,
  slivers: [
    SliverStickyCollapsablePanel(
      scrollController: _scrollController,
      panelController: StickyCollapsablePanelController(key:'key_1'),
      headerBuilder: (context, status) => SizedBox.fromSize(size: Size.fromHeight(48)),
      sliverPanel: SliverList.list(children: [...]),
    ),
  ],
)

Alternatives

Packages that do the same job and could replace sliver_sticky_collapsable_panel.