inventoryGridCellDelta function
Calculates the layout translation delta between oldIndex and newIndex.
Implementation
Offset inventoryGridCellDelta({
required int oldIndex,
required int newIndex,
required int crossAxisCount,
required double cellSize,
required double spacing,
}) {
final oldOffset = inventoryGridCellOffset(
index: oldIndex,
crossAxisCount: crossAxisCount,
cellSize: cellSize,
spacing: spacing,
);
final newOffset = inventoryGridCellOffset(
index: newIndex,
crossAxisCount: crossAxisCount,
cellSize: cellSize,
spacing: spacing,
);
return oldOffset - newOffset;
}