collectIsDraggedAsState
Composable Function
Common
@Composable
fun InteractionSource.collectIsDraggedAsState(): State<Boolean>
Subscribes to this MutableInteractionSource
and returns a State
representing whether this
component is dragged or not.
DragInteraction
is typically set by interactions such as
androidx.compose.foundation.gestures.draggable
and
androidx.compose.foundation.gestures.scrollable
, and higher level components such as
androidx.compose.foundation.lazy.LazyRow
, available through
androidx.compose.foundation.lazy.LazyListState.interactionSource
.
Returns
State representing whether this component is being dragged or not |