⌂
›
Widgets
›
DragTarget
DragTarget
DragTarget control. Build it with the drag_target helper.
Example
drag_target(
content: text("DragTarget"),
expand: true,
on_accept: ->(event) {}
)
Properties
content— The single child control rendered inside this control.group— Sets the group property.
Common layout and animation properties
badge— Badge drawn on the corner of the control.col— Responsive column span (1-12) per breakpoint.data— Arbitrary value you can attach to the control and read back in handlers.disabled— Disables interaction when true.expand— Fills the available space along the parent's main axis when true.expand_loose— Like expand, but only grows up to the child's natural size.key— Stable identity used to preserve state across rebuilds.opacity— Opacity from 0.0 (transparent) to 1.0 (opaque).rtl— Renders right-to-left when true.tooltip— Text shown on hover/long-press.visible— Hides the control when false.
Events
on_accept— Fired on accept.on_leave— Fired on leave.on_move— Fired on move.on_will_accept— Fired on will accept.
Reference
- Family:
shared - Widget type:
dragtarget - Helpers:
drag_target,dragtarget