pub struct ReorderableDragStartListener {
pub key: Option<KeyRef>,
pub child: WidgetRef,
pub index: i32,
pub enabled: bool,
}Expand description
A wrapper widget that will recognize the start of a drag on the wrapped widget by a
PointerDownEvent, and immediately initiate dragging the wrapped item to a new location
in a reorderable list.
See also:
ReorderableDelayedDragStartListener, a similar wrapper that will only recognize the start after a long press event.ReorderableList, a widget list that allows the user to reorder its items.SliverReorderableList, a sliver list that allows the user to reorder its items.ReorderableListView, a Material Design list that allows the user to reorder its items.
Fields§
§key: Option<KeyRef>§child: WidgetRefThe widget for which the application would like to respond to a tap and drag gesture by starting a reordering drag on a reorderable list.
index: i32The index of the associated item that will be dragged in the list.
enabled: boolWhether the child item can be dragged and moved in the list.
If true, the item can be moved to another location in the list when the user taps on the child. If false, tapping on the child will be ignored.
Implementations§
Source§impl ReorderableDragStartListener
impl ReorderableDragStartListener
Sourcepub fn new<K>(
child: impl IntoWidget<K>,
index: i32,
) -> ReorderableDragStartListener
pub fn new<K>( child: impl IntoWidget<K>, index: i32, ) -> ReorderableDragStartListener
Creates a listener for a drag immediately following a pointer down event over the given child widget.
This is most commonly used to wrap part of a list item like a drag handle.
Sourcepub fn key(self, key: KeyRef) -> ReorderableDragStartListener
pub fn key(self, key: KeyRef) -> ReorderableDragStartListener
Dart ReorderableDragStartListener(key:).
Sourcepub fn enabled(self, enabled: bool) -> ReorderableDragStartListener
pub fn enabled(self, enabled: bool) -> ReorderableDragStartListener
Dart ReorderableDragStartListener(enabled:).
Trait Implementations§
Source§impl Clone for ReorderableDragStartListener
impl Clone for ReorderableDragStartListener
Source§impl Debug for ReorderableDragStartListener
impl Debug for ReorderableDragStartListener
Source§impl ReorderableDragStartListenerWidget for ReorderableDragStartListener
impl ReorderableDragStartListenerWidget for ReorderableDragStartListener
Source§fn reorderable_drag_start_listener(&self) -> &ReorderableDragStartListener
fn reorderable_drag_start_listener(&self) -> &ReorderableDragStartListener
Source§fn create_recognizer(&self, app: &mut App) -> MultiDragRecognizerRef
fn create_recognizer(&self, app: &mut App) -> MultiDragRecognizerRef
Source§impl StatelessWidget for ReorderableDragStartListener
impl StatelessWidget for ReorderableDragStartListener
Source§fn build(&self, app: &mut App, context: BuildContext) -> WidgetRef
fn build(&self, app: &mut App, context: BuildContext) -> WidgetRef
Source§fn debug_fill_properties(
&self,
_app: &App,
properties: &mut DiagnosticPropertiesBuilder,
)
fn debug_fill_properties( &self, _app: &App, properties: &mut DiagnosticPropertiesBuilder, )
debugFillProperties: the properties a dump shows for this widget, in Dart’s
order. Dart’s Widget base only sets the dense tree style, which the framework does.Source§fn debug_check_constructor(&self)
fn debug_check_constructor(&self)
Source§fn as_preferred_size_widget(&self) -> Option<&dyn PreferredSizeWidget>
fn as_preferred_size_widget(&self) -> Option<&dyn PreferredSizeWidget>
this is PreferredSizeWidget: a widget that implements PreferredSizeWidget
answers with itself, which is what a parent asking an erased child for its preferred
size reads.Auto Trait Implementations§
impl !RefUnwindSafe for ReorderableDragStartListener
impl !Send for ReorderableDragStartListener
impl !Sync for ReorderableDragStartListener
impl !UnwindSafe for ReorderableDragStartListener
impl Forget for ReorderableDragStartListener
impl Freeze for ReorderableDragStartListener
impl Move for ReorderableDragStartListener
impl Unpin for ReorderableDragStartListener
impl UnsafeUnpin for ReorderableDragStartListenerwhere
*const RcInner<dyn Key> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn Key>>: UnsafeUnpin,
*const RcInner<dyn Widget> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn Widget>>: UnsafeUnpin,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<W> IntoWidget<StatelessKind> for Wwhere
W: StatelessWidget,
impl<W> IntoWidget<StatelessKind> for Wwhere
W: StatelessWidget,
Source§fn into_widget(self) -> Rc<dyn Widget>
fn into_widget(self) -> Rc<dyn Widget>
creation_location.