overflow_view
0.7.0, released 3 weeks ago by romainrastel.com
Displays children in a line with an overflow indicator at the end if space is insufficient.
What it does
A Flutter widget that lays out children horizontally or vertically, showing an overflow indicator when they don't all fit. It supports both fixed sizes (based on the first child) and flexible sizes for each child, as well as multiple runs like a Wrap.
AI-written summary of version 0.7.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to display a horizontal list of avatars and show a '+N' badge for the rest
- You want to build a menu bar that automatically hides items that do not fit
- You need items to wrap across multiple lines with an overflow indicator at the end
Skip it when
- You need standard scrolling list views where all items should be accessible via scroll rather than hidden
Strengths
- Supports both fixed-size constraints and flexible child sizing
- Can display children in multiple runs (rows or columns) like a Wrap
- Supports right-to-left layouts and negative spacing for overlapping children
Weaknesses
- Flexible constructor is less performant than the default constructor
- Limited to displaying an overflow count indicator rather than full scrollable overflow
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 1
OverflowView(
direction: Axis.horizontal,
spacing: 4,
children: <Widget>[
for (int i = 0; i < 5;
AvatarWidget(text: '$i'),
],
builder: (context, remaining) {
return AvatarWidget(
text: '+$remaining',
color: Colors.red,
);
},
)Alternatives
Packages that do the same job and could replace overflow_view.
- steps_indicator
A Flutter plugin to display a simple steps indicator line widget.
50Compare - pull_to_refresh_new
A refresh indicator widget that supports android, ios, and web.
41Compare - page_view_indicators
Customizable page indicators for PageViews including circles, arrows, progress, and steps.
48Compare - invert_colors
A lightweight widget that inverts the colors of its children.
38Compare
Works with
Packages commonly used together with overflow_view: ones it builds on, ones built on it, and its own family.