ReorderableBuilderController class

Handles logic to set all ReorderableEntity that are related to the children.

Every child gets a ReorderableEntity that contains information about the position, the size and so on. This is need for calculations later when the children are moving or changing their position.

Inheritance
Implementers

Properties

builtKeyValues → Set<String>
Key values of children built since the item count decreased.
finalinherited
childrenKeyMap → Map<String, ReorderableEntity>
finalinherited
childrenOrderMap → Map<int, ReorderableEntity>
finalinherited
draggedEntity ↔ ReorderableEntity?
Instance of dragged entity when dragging starts.
getter/setter pairinherited
draggingAnimationMap → Map<ValueKey, DraggingAnimationEntity>
Visible offsets of all children animated while dragging, by their key.
finalinherited
hashCode → int
The hash code for this object.
no setterinherited
isScrollableOutside ↔ bool
Defines if the scrollable part is outside of the widget.
getter/setter pairinherited
lastBuiltChildren → Map<String, Widget>
Last built widget of every child by its key value.
finalinherited
lastRemovedEntities ↔ List<ReorderableEntity>
Entities of the children removed by the last update of the children.
getter/setter pairinherited
lockedIndices ↔ List<int>
Indices of children that cannot move while drag and drop.
getter/setter pairinherited
offsetMap → Map<int, Offset>
finalinherited
positionChangeDelay ↔ Duration
Delay for position changes caused by removed children.
getter/setter pairinherited
releasedReorderableEntity ↔ ReleasedReorderableEntity?
Entity that is released after drag and drop.
getter/setter pairinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
scrollDirection ↔ Axis?
Main axis of the grid, used when dragging before/after all children.
getter/setter pairinherited
scrollOffset ↔ Offset
Holding this value for better performance.
getter/setter pairinherited
startDraggingScrollOffset ↔ Offset
Saves the state of scroll Offset when the drag and drop is starting.
getter/setter pairinherited

Methods

addBuiltChild({required ValueKey key, required Widget child}) → void
Saves child as the last built widget of key.
inherited
applyCollision({required ReorderableEntity? collision, required Offset draggedOffset}) → bool
Applies collision to the order and positions of the children.
inherited
getReorderableEntity({required ValueKey key, required int index}) → ReorderableEntity
Creates or updates ReorderableEntity related to key and returns it.
inherited
handleCreatedChild({required Offset? offset, required Size size, required ReorderableEntity reorderableEntity}) → ReorderableEntity
Updates specific values of reorderableEntity and update maps.
inherited
handleDragEnd() → List<ReorderUpdateEntity>?
inherited
handleDragStarted({required ReorderableEntity reorderableEntity, required Offset currentScrollOffset, required List<int> lockedIndices, required bool isScrollableOutside, required int? itemCount, required Axis? scrollDirection}) → void
inherited
handleDragUpdate({required PointerMoveEvent pointerMoveEvent}) → bool
inherited
handleMovingFinished({required ReorderableEntity reorderableEntity}) → ReorderableEntity
Updates offset and order id of reorderableEntity faded in.
inherited
handleOpacityFinished({required ReorderableEntity reorderableEntity}) → ReorderableEntity
Updates offset and order id of reorderableEntity faded in.
inherited
handleSizeChanged() → void
Resets all entities in childrenOrderMap and childrenKeyMap.
inherited
initChildren({required List<Widget> children}) → void
Adds ReorderableEntity for all children to two maps.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
removeBuiltChild({required ValueKey key, required Widget child}) → void
Removes child of key from lastBuiltChildren after it was disposed.
inherited
reorderList<T>({required List<T> items, required List<ReorderUpdateEntity> reorderUpdateEntities}) → List<T>
Reorders list of items that depends on reorderUpdateEntities.
inherited
replaceMaps({required Map<String, ReorderableEntity> updatedChildrenKeyMap, required Map<int, ReorderableEntity> updatedChildrenOrderMap}) → void
inherited
shortenMapsToItemCount({required int itemCount}) → void
Removes all children that have a higher position the itemCount.
inherited
toString() → String
A string representation of this object.
inherited
updateChildren({required List<Widget> children}) → void
Iterates through children and updates childrenKeyMap and childrenOrderMap.
updateToActualPositions() → void
Iterates through childrenKeyMap and updates ReorderableEntity.
inherited

Operators

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