copyWith method

ReorderableEntity copyWith({
  1. Offset? originalOffset,
  2. Offset? updatedOffset,
  3. Widget? child,
  4. Size? size,
  5. int? originalOrderId,
  6. int? updatedOrderId,
  7. bool? isBuilding,
  8. bool? isNew,
  9. bool? hasSwappedOrder,
})

Overrides all parameters of this entity and returns the updated ReorderableEntity.

Implementation

ReorderableEntity copyWith({
  Offset? originalOffset,
  Offset? updatedOffset,
  Widget? child,
  Size? size,
  int? originalOrderId,
  int? updatedOrderId,
  bool? isBuilding,
  bool? isNew,
  bool? hasSwappedOrder,
}) =>
    ReorderableEntity(
      size: size ?? this.size,
      originalOffset: originalOffset ?? this.originalOffset,
      updatedOffset: updatedOffset ?? this.updatedOffset,
      child: child ?? this.child,
      updatedOrderId: updatedOrderId ?? this.updatedOrderId,
      originalOrderId: originalOrderId ?? this.originalOrderId,
      isBuilding: isBuilding ?? this.isBuilding,
      isNew: isNew ?? this.isNew,
      hasSwappedOrder: hasSwappedOrder ?? this.hasSwappedOrder,
    );