flexbox_layout 1.1.0
flexbox_layout: ^1.1.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.1.0 - 2026-01-15 #
Added #
FlexboxScaleController- Controller for scalable flexbox with pinch-to-zoom support- Responsive scaling that follows pinch gestures in real-time
- Smooth snap animation with spring physics
- Mode switching between 1:1 grid and aspect ratio modes
- Velocity-based momentum for natural gesture continuation
- Configurable snap points, min/max extent, and grid mode threshold
FlexboxScaleModeenum - Display mode for scalable flexbox (grid1x1,aspectRatio)SliverFlexboxDelegateWithDirectExtent- Delegate with direct extent control- Supports smooth continuous scaling without discrete column jumps
- Fill factor interpolation for smooth layout transitions
- Ideal for Google Photos-like pinch-to-zoom experience
SliverScalableFlexbox- Scalable sliver widget with pinch-to-zoom support- Automatically rebuilds when controller's extent changes
- Integrates with CustomScrollView for seamless scrolling
Features #
- Pinch-to-zoom gesture support for flexbox layouts
- Spring physics animations for smooth snap transitions
- Fill factor animation for smooth layout state transitions
- Automatic display mode switching based on zoom level
- Double-tap to zoom between predefined levels
- Programmatic zoom control with
zoomIn()andzoomOut()methods - Velocity-based gesture momentum for natural feel
Example #
- Added
ScalableFlexboxPagedemonstrating pinch-to-zoom gallery - Network image gallery example with multiple image sources (Nekosia, Yande, Zerochan)
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