Skip to content
pubscout

flexible_wrap

1.0.7, released a year ago by bixat.dev

Flutter widget that arranges children in a flexible wrap layout with spacing and RTL support.

WASM-ready
$ flutter pub add flexible_wrap
Source repository

What it does

FlexibleWrap is a custom Flutter layout widget that automatically wraps its children onto the next line based on available space, while expanding items to distribute available space evenly. It supports customizable horizontal and vertical spacing, and right-to-left (RTL) text directions.

AI-written summary of version 1.0.7, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need a wrap layout that expands items to fill available space in a row.
  • You require right-to-left (RTL) direction support for wrapped items.
  • You are building uniform grid-like layouts such as product cards or image galleries.

Skip it when

  • You have items with varying widths (only same-width items are currently fully supported).
  • You need height-direction wrapping features.
  • You require a builder pattern for performance with massive lists (currently uses children instead).

Strengths

  • Automatic space distribution across wrapped items
  • Built-in right-to-left (RTL) layout support
  • Customizable horizontal spacing and run spacing

Weaknesses

  • Does not currently support items with different widths
  • Does not support a builder pattern for large data sets
  • Height direction layout is not supported yet

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
0
FlexibleWrap(
  spacing: 12.0,
  runSpacing: 12.0,
  children: [
    Container(height: 100, width: 300, color: Colors.blue),
    Container(height: 100, width: 300, color: Colors.blue),
  ],
)

Alternatives

Packages that do the same job and could replace flexible_wrap.

  • docking

    Flutter layout for docking widgets into split and tabbed views.

  • flex_list

    A Flutter layout widget that wraps elements and extends their width to fill each row.

  • signed_spacing_flex

    Flex, Column, and Row widgets that support positive or negative spacing.