-
public final class SwipeRevealCoordinatorCoordinates swipe-to-reveal state across multiple channel list items, ensuring only one item is open at a time.
-
-
Constructor Summary
Constructors Constructor Description SwipeRevealCoordinator()
-
Method Summary
Modifier and Type Method Description final Unitregister(String cid, AnchoredDraggableState<SwipeRevealValue> state)Registers a swipe state for the given channel CID. final Unitunregister(String cid)Unregisters the swipe state for the given channel CID. final UnitonItemOpened(String cid)Notifies the coordinator that an item has been opened. final UnitcloseAll()Closes all currently open items. -
-
Method Detail
-
register
final Unit register(String cid, AnchoredDraggableState<SwipeRevealValue> state)
Registers a swipe state for the given channel CID. Called from SwipeableChannelItem's DisposableEffect.
-
unregister
final Unit unregister(String cid)
Unregisters the swipe state for the given channel CID. Called when SwipeableChannelItem leaves composition.
-
onItemOpened
final Unit onItemOpened(String cid)
Notifies the coordinator that an item has been opened. All other open items will be animated to SwipeRevealValue.Closed.
-
-
-
-