BoardDragState class

Manages the state of drag and drop operations

Inheritance

Constructors

BoardDragState()

Properties

currentPosition Offset?
The current position of the dragged item
no setter
draggedItem BoardItemState?
The currently dragged item
no setter
draggedItemIndex int?
The index of the item being dragged
no setter
draggedListIndex int?
The index of the list being dragged
no setter
hashCode int
The hash code for this object.
no setterinherited
hasListeners bool
Whether any listeners are currently registered.
no setterinherited
isDragging bool
Whether an item is currently being dragged
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
startItemIndex int?
The original item index where dragging started
no setter
startListIndex int?
The original list index where dragging started
no setter

Methods

addListener(VoidCallback listener) → void
Register a closure to be called when the object changes.
inherited
cancelDrag() → void
Cancels the drag operation and returns to original position
dispose() → void
Discards any resources used by the object. After this is called, the object is not in a usable state and should be discarded (calls to addListener will throw after the object is disposed).
inherited
endDrag() → void
Ends the drag operation
moveItem({required int newListIndex, required int newItemIndex}) → void
Moves the dragged item to a new position
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners() → void
Call all the registered listeners.
inherited
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that are notified when the object changes.
inherited
setCallbacks(BoardCallbacks? callbacks) → void
Sets the callbacks for drag state changes
startDrag({required BoardItemState item, required int listIndex, required int itemIndex, required Offset position}) → void
Starts a drag operation
toString() String
A string representation of this object.
inherited
updateDragPosition(Offset position) → void
Updates the drag position

Operators

operator ==(Object other) bool
The equality operator.
inherited