flexbox_layout 1.0.0
flexbox_layout: ^1.0.0 copied to clipboard
A Flutter library for CSS Flexbox layout. Provides widgets for creating layouts using the CSS Flexbox layout model, bringing the power and flexibility of flexbox to Flutter.
Changelog #
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
1.0.0 - 2026-01-14 #
Added #
- Initial release of the Flutter Flexbox library
Flexboxwidget - full CSS Flexbox layout implementationFlexItemwidget - wrapper for flex item propertiesFlexboxList- scrollable list with flexbox layout capabilitiesSliverFlexbox- sliver version for CustomScrollViewDynamicFlexboxList- auto-sizing flexbox list for variable contentSliverDynamicFlexbox- dynamic sliver for CustomScrollViewDimensionResolver- utility for measuring child dimensions- Multiple delegate types for different layout scenarios:
SliverFlexboxDelegateWithFixedCrossAxisCountSliverFlexboxDelegateWithMaxCrossAxisExtentSliverFlexboxDelegateWithAspectRatiosSliverFlexboxDelegateWithDynamicAspectRatiosSliverFlexboxDelegateWithFlexValuesSliverFlexboxDelegateWithBuilder
Features #
- Full CSS Flexbox layout algorithm implementation
- Support for
flexDirection,flexWrap,justifyContent,alignItems,alignContent - Flex item properties:
order,flexGrow,flexShrink,alignSelf,flexBasisPercent - Size constraints:
minWidth,minHeight,maxWidth,maxHeight wrapBeforeproperty for explicit line breaks- Main axis and cross axis spacing
- Item recycling for efficient scrolling
- Dynamic sizing based on aspect ratios
- Text direction support (LTR/RTL)
- Max lines limitation for wrapped layouts
- Configurable thresholds for layout updates:
aspectRatioChangeThreshold- minimum aspect ratio change to trigger updatecrossAxisExtentChangeThreshold- viewport width change to clear cache
FlexboxListextendsBoxScrollViewfor better framework integration- Comprehensive Dart documentation with examples for all public APIs
Example #
- Complete example app with interactive playground
- Demonstrations of all major features
- Network image gallery example