ReorderableEntity class

Represents child with some extra information.

When animating all children in this package, this entity is important to have access to all needed values of child.

With this entity, it is possible to know where the child is positioned and which order that child has inside all children.

Also the current state of child is added as information: isBuilding, isNew and hasSwappedOrder.

Constructors

ReorderableEntity({required Widget child, required int originalOrderId, required int updatedOrderId, required bool isBuilding, Offset originalOffset = Offset.zero, Offset updatedOffset = Offset.zero, Size size = Size.zero, bool isNew = false, bool hasSwappedOrder = false})
const

Properties

child Widget
Represents this entity
final
hashCode int
The hash code for this object.
no setterinherited
hasSwappedOrder bool
Is true, when this child only changed the position with another child.
final
isBuilding bool
Usually means that the child has a new position that is still unknown.
final
isNew bool
The Offset can already be known but this is still a flag to know, that child didn't exist before.
final
key Key
no setter
originalOffset Offset
Describes the original Offset before it was updated.
final
originalOrderId int
Describes the original orderId before it was updated.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
size Size
Describes size of child.
final
updatedOffset Offset
Describes the updated Offset when it was updated.
final
updatedOrderId int
Describes the updated orderId when it was updated.
final

Methods

copyWith({Offset? originalOffset, Offset? updatedOffset, Widget? child, Size? size, int? originalOrderId, int? updatedOrderId, bool? isBuilding, bool? isNew, bool? hasSwappedOrder}) ReorderableEntity
Overrides all parameters of this entity and returns the updated ReorderableEntity.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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