stretchy_header
2.0.0, released 6 years ago by diegoveloper.com
Create an elastic stretchy header effect when scrolling down a widget in Flutter.
What it does
Allows developers to easily add an elastic, stretchy header to scrollable widgets like ListViews or SingleChildScrollView. The header stretches dynamically when the user scrolls down, and supports overlays, blur effects, highlights, and refresh callbacks.
AI-written summary of version 2.0.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You want a profile or detail screen with a stretchy banner image at the top.
- You need a custom header that responds elastically to scrolling gestures.
Skip it when
- You require standard non-stretching app bars or SliverAppBar behaviors.
- You are not using Flutter.
Strengths
- Supports multiple builders like list views and single child layouts.
- Includes customizable features like blur, overlays, and highlight alignments.
Weaknesses
- Limited to stretchy header effects.
- May require adapting existing custom scroll physics if mixed with other sliver setups.
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 0
Scaffold(
body: StretchyHeader.listViewBuilder(
headerData: HeaderData(
headerHeight: 250,
header: Image.asset("images/chichen.jpg", fit: BoxFit.cover),
),
itemCount: 15,
itemBuilder: (context, index) {
return ListTile(title: Text("item $index"));
},
),
)Alternatives
Packages that do the same job and could replace stretchy_header.
- flutter_expandable_table
A Flutter widget for creating an expandable table with fixed headers and first columns.
82Compare - feedback
Widget to collect annotated screenshots and text feedback from users
84Compare - android_window
Flutter plugin to create native Android floating windows.
35Compare - scroll_when_needed
Custom scroll behavior and physics to scroll only when content exceeds available space.
46Compare