Skip to content
pubscout

gap

3.1.0, released 2 weeks ago by an unverified publisher

Flutter widgets for easily adding gaps inside Flex widgets and scrolling views.

WASM-ready
$ flutter pub add gap
Source repository

What it does

Provides Gap, MaxGap, SliverGap, and AnimatedGap widgets to add empty space inside Rows, Columns, and scrolling views without needing SizedBox or Padding.

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

Use it when

  • You want a cleaner, less verbose alternative to SizedBox inside Columns and Rows
  • You need gaps inside scrollable views or sliver lists
  • You want gaps that automatically adapt to the direction of a Flex widget

Skip it when

  • You do not use Flex widgets or scrollable views
  • Standard Padding or SizedBoxes are already sufficient for your codebase style

Strengths

  • Less verbose than SizedBox
  • Direction-agnostic within Rows and Columns
  • Supports slivers, max-sizes, and animations

Weaknesses

  • Adds an external dependency for something achievable with built-in widgets

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
0
Column(
  children: <Widget>[
    Container(color: Colors.red, height: 20),
    const Gap(20),
    Container(color: Colors.red, height: 20),
  ],
)

Alternatives

Packages that do the same job and could replace gap.

Works with

Packages commonly used together with gap: ones it builds on, ones built on it, and its own family.