QuiltFaucet<T> class

The core engine for generating and managing quilts from tile data in Carpet layouts.

QuiltFaucet handles tile sizing, placement optimization, and buffer management using algorithms for variance-minimized arrangements. It prefetches via QuiltTileFaucet, caches sizes, and builds StaggeredGrid widgets with MeasureSize for height tracking. Integrates with CarpetStyle for responsive rules and Refresher for pull-to-refresh in infinite feeds.

Constructors

QuiltFaucet({required QuiltTileBuilder<T> tileBuilder, required QuiltTileFaucet<T> tileFaucet, required CarpetStyle style})
Constructs a QuiltFaucet with style, tile source, and builder.

Properties

averageQuiltHeight double
Computes the average height of known quilts.
no setter
estimateCarpetExtent double
Estimates the total carpet height including unknowns.
no setter
futureEdge DateTime?
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
pastEdge DateTime?
getter/setter pair
qSizeCache Map<String, List<QSize>>
getter/setter pair
quiltBuffer List<Widget>
getter/setter pair
quiltHeights List<double>
getter/setter pair
quiltPostCounts List<int>
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
style CarpetStyle
final
tileBuilder QuiltTileBuilder<T>
getter/setter pair
tileFaucet QuiltTileFaucet<T>
final
unknownExtent double
Estimates the unknown extent of unloaded content in screen heights.
no setter
unseenFuture Iterable<T>
Getter for unseen future tiles based on edge timestamp.
no setter
unseenPast Iterable<T>
Getter for unseen past tiles based on edge timestamp.
no setter
unseenPastQuiltCount int
Counts consecutive unknown quilts from the past end.
no setter

Methods

buildFuture() Future<void>
Asynchronously builds future-direction quilts, pulling if needed.
buildPast({bool allowPull = true}) Future<void>
Asynchronously builds past-direction quilts, optionally pulling data.
buildQuilt(int start, {int? maxPosts}) QuiltResult
Builds a quilt from a range of tiles, optimizing placement for minimal variance.
buildQuilts(QuiltDirection direction, {bool allowPull = true}) Future<void>
Builds quilts in the specified direction, handling pulls and insertions.
buildSinglePostQuilt(T post) QuiltResult
Builds a single-post fallback quilt when multi-tile placement fails.
buildTile(T post) → StaggeredGridTile
Builds a single-tile quilt as fallback for unplaceable content.
createGrid(List<StaggeredGridTile> tiles) Widget
Wraps tiles in a measurable StaggeredGrid for height tracking.
createTile(T post, int w, int h) → StaggeredGridTile
Creates a StaggeredGridTile for the given tile data and dimensions.
getQSizeList(T post, int nMax) List<QSize>
Retrieves or computes size options for a tile, sorted by area and aspect deviation.
getStaggeredGrid(Widget widget) → StaggeredGrid
Recursively extracts the inner StaggeredGrid from wrapped widgets.
hasHoles(Widget widget) bool
Detects holes (gaps) in a quilt's layout by simulating placement.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
placeTile(List<int> heights, int tileW, int tileH, int targetH) List<int>?
Attempts to place a tile of given dimensions in the height map, returning updated heights or null.
toString() String
A string representation of this object.
inherited
transplant({CarpetStyle? style, QuiltTileFaucet<T>? buffer}) QuiltFaucet<T>
Creates a new QuiltFaucet by transplanting style or buffer.

Operators

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