CompactorDelegate class abstract

A strategy delegate for compacting the layout and resolving collisions.

Implement this interface to create custom layout behaviors (e.g. Tetris-like, Gravity-based, or fixed-position layouts).

Implementers

Constructors

CompactorDelegate()
Constructor for CompactorDelegate.
const

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

compact(List<LayoutItem> layout, int cols, {bool allowOverlap = false}) → List<LayoutItem>
Compacts the layout by removing gaps according to specific rules.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
resolveCollisions(List<LayoutItem> layout, int cols) → Layout
Resolves overlaps by pushing items without necessarily compacting (pulling back). Used primarily during drag operations to ensure validity without fighting the user.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited