bento_layout 0.1.2 copy "bento_layout: ^0.1.2" to clipboard
bento_layout: ^0.1.2 copied to clipboard

A Flutter package for building bento-style grid layouts using the skyline bin-packing algorithm. Tiles of varying sizes are packed without overlap or unnecessary gaps. Width fills the parent; height i [...]

Changelog #

All notable changes to this package are documented here. This project adheres to Semantic Versioning. #

0.1.2 #

Changed #

  • Updated demo GIFs links in README

0.1.1 #

Changed #

  • Updated README with example screenshots and demo GIFs

0.1.0 #

Initial release.

Added #

  • BentoGrid — drop-in scrollable grid widget powered by the skyline algorithm
  • BentoItem — tile wrapper accepting any Widget child and a BentoItemSize
  • BentoItemSize — 9-value enum encoding both width and height in a self-documenting name (quarterBar, halfCard, fullTower etc.)
  • BentoDimension — resolved tile dimensions as widthFraction + heightSpan
  • BentoSizingStrategy — abstract interface for custom size mappings
  • DefaultBentoSizingStrategy — built-in 3×3 size matrix (quarter/half/full × Bar/Card/Tower)
  • BentoGridDelegate — exported SliverGridDelegate for composing the grid into custom CustomScrollView scroll views alongside other slivers

Design decisions #

  • Tile widths expressed as fractions of total width — no column count required
  • Tile heights use a fixed unitHeight (default 180px) decoupled from width — heights are consistent across all screen sizes
  • Skyline slot granularity derived automatically from the smallest widthFraction present in the item list
  • Greedy bin-packing — items are placed at the lowest available position in order, preserving intentional tile sequence
1
likes
150
points
190
downloads

Documentation

API reference

Publisher

verified publisherbuiltbysid.dev

Weekly Downloads

A Flutter package for building bento-style grid layouts using the skyline bin-packing algorithm. Tiles of varying sizes are packed without overlap or unnecessary gaps. Width fills the parent; height is stable across screen sizes.

Repository (GitHub)
View/report issues

Topics

#layout #grid #ui #bento

License

MIT (license)

Dependencies

flutter

More

Packages that depend on bento_layout