responsive_flex_list library

A responsive, flexible list layout system for Flutter.

responsive_flex_list provides drop-in widgets for building adaptive lists and masonry-style grids that adjust seamlessly across screen sizes.

Features:

  • Predefined responsive breakpoints (customizable globally or per widget)
  • Multiple layout strategies (standard, Instagram-like masonry, axis-separated)
  • RTL support and adaptive image handling
  • Animation helpers for item transitions

Classes

AnimationTransitionBuilder
Builder class that creates animation transitions based on animation type with RTL support.
Breakpoints
Defines responsive breakpoints and their corresponding column counts.
ResponsiveConfig
ResponsiveFlexList<T>
A responsive list view that automatically adjusts the number of columns based on screen breakpoints.
ResponsiveFlexMasonry<T>
Creates a responsive masonry-style list.
RTLOptions
A responsive list view that automatically adjusts the number of columns based on screen breakpoints with RTL support.

Enums

AnimationFlow
Defines how animations are applied to items in the responsive list.
MainAxisSeparatorMode
Determines how separators span across the main axis in row layouts.
ResponsiveAnimationType
Available animation types for responsive list transitions.
ResponsiveListType
Internal enum to distinguish between different ResponsiveFlexList constructors.

Extensions

ScreenSize on BuildContext
Convenience getters for screen size and breakpoint checks.

Constants

kDefaultAnimationCurve → const Curve
Default animation curve
kDefaultAnimationDuration → const Duration
Default animation duration for ResponsiveFlexList animations
kDefaultAnimationFlow → const AnimationFlow
Default animation mode
kDefaultCrossAxisSpacing → const double
kDefaultMainAxisSeparatorMode → const MainAxisSeparatorMode
kDefaultMainAxisSpacing → const double
Default spacing values
kDefaultMaxStaggeredItems → const int
Default maximum number of items to animate
kDefaultResponsiveAnimationType → const ResponsiveAnimationType
Default animation type
kDefaultStaggerDelay → const Duration
Default stagger delay between item animations

Typedefs

CustomAnimationBuilder = Widget Function(BuildContext context, Widget child, Animation<double> animation)
Type definition for custom animation builders.
ItemBuilder<T> = Widget Function(T item, int index)
Typedef for item builders
ItemHeightProvider = double Function(int index)
Callback to provide the height of an item at a given index
SeparatorBuilder = Widget Function(int index, int total)