view, which can be picked up when a press on it travels: on_start is what picking it up sends (the app remembers what is being carried), and Dnd::on_cancel what ending the drag over nothing sends. A press that does not travel is still a click.
Signature
pub const fn draggable<V, M>(view: V, on_start: M) -> Dnd<V, M>Methods
.on_cancel(message: M) -> Self— Sendsmessagewhen a drag from this view ends without a drop..on_drop(message: M) -> Self— Also takes drops, sendingmessage(a view that can be carried and also be dropped on).
Example
use fusuma::{button, draggable};
let view = draggable(button("Card"), ());
let built = fusuma::doc::built::<(), _>(&view);
assert_eq!(built.texts(), ["Card"]);