anchored Drag
Call this function to take control of drag logic and perform anchored drag with the latest anchors.
All actions that change the offset of this UnstyledAnchoredDraggableState must be performed within an anchoredDrag block (even if they don't call any other methods on this object) in order to guarantee that mutual exclusion is enforced.
If anchoredDrag is called from elsewhere with the dragPriority higher or equal to ongoing drag, the ongoing drag will be cancelled.
If the anchors change while the block is being executed, it will be cancelled and re-executed with the latest anchors and target. This allows you to target the correct state.
Parameters
of the drag operation
perform anchored drag given the current anchor provided
Call this function to take control of drag logic and perform anchored drag with the latest anchors and target.
All actions that change the offset of this UnstyledAnchoredDraggableState must be performed within an anchoredDrag block (even if they don't call any other methods on this object) in order to guarantee that mutual exclusion is enforced.
This overload allows the caller to hint the target value that this anchoredDrag is intended to arrive to. This will set UnstyledAnchoredDraggableState.targetValue to provided value so consumers can reflect it in their UIs.
If the anchors or UnstyledAnchoredDraggableState.targetValue change while the block is being executed, it will be cancelled and re-executed with the latest anchors and target. This allows you to target the correct state.
If anchoredDrag is called from elsewhere with the dragPriority higher or equal to ongoing drag, the ongoing drag will be cancelled.
Parameters
hint the target value that this anchoredDrag is intended to arrive to
of the drag operation
perform anchored drag given the current anchor provided