call method
Returns or creates a QuiltFaucet with the given style and update handler.
Transplants if style changes, rebuilding past quilts to adapt layout. Triggers onUpdate post-rebuild for state refresh in Carpet.
Implementation
QuiltFaucet<T> call({
required VoidCallback onUpdate,
required CarpetStyle style,
}) {
_faucet ??= QuiltFaucet<T>(
tileFaucet: tileFaucet, style: style, tileBuilder: tileBuilder);
if (_faucet!.style != style) {
_faucet = _faucet!.transplant(
style: style,
buffer: tileFaucet,
);
_faucet!
..buildPast(allowPull: false)
..buildPast(allowPull: true).then((_) => onUpdate());
}
return _faucet!;
}