pub fn FileDropTarget(_: FileDropTargetProps) -> ElementExpand description
A place files may be dropped.
A widget rather than a property on every container, because willingness has to be absent by default and a handler cannot be: a listener is attached whether or not a screen supplied one, so four containers each grew three records for saying nothing. Being this widget is the willingness, and nothing else in the tree carries any of it.
Desktop only in effect. A phone has no notion of letting a file go over a window, so the events never arrive there and the same screen compiles and runs unchanged.
ยงProps
For details, see the props struct definition.
weight:Option<f32>width:Option<f32>height:Option<f32>padding:Option<f32>padding_role:Option<SpaceRole>background:Option<Paint>shape_role:Option<ShapeRole>corner_radius:Option<f32>border_width:Option<f32>border_color:Option<Paint>elevation:Option<f32>fill_max_width:boolfill_max_height:boolalignment:Option<Alignment>on_files_entered:EventHandler<()>Files have come over this node. Nothing about what they are: the platforms disagree about what is knowable before a drop, and a screen that only lights up does not need to know.
on_files_dropped:EventHandler<FileDrop>Files were let go here.
children:Element