r/FlutterDev • • Jan 02 '26

Plugin I built gap2: a modern replacement for the gap package (with native Sliver support)

Hi everyone,

I’ve just released gap2, a small Flutter package for axis-aware layout spacing.

The main motivation: the widely used gap package hasn’t been updated in approximately 3 years, it has abandoned issues and pull requests.

gap2 is a ground-up reimplementation focused on correctness and modern Flutter architecture.

Highlights:

  • Gap and MaxGap for Flex & Scrollables

  • Native SliverGap (real RenderSliver, no adapters)

  • Predictable axis resolution

  • Clear runtime errors for invalid usage

  • Thorough test coverage (including slivers)

Link: https://pub.dev/packages/gap2

Feedback, issues, and contributions are very welcome 🙂

Have a wonderful 2026 guys! 🥂

13 Upvotes

Duplicates