getShiftFromConstraints method

Offset getShiftFromConstraints(
  1. int index
)

Implementation

Offset getShiftFromConstraints(int index) {
  final shift = switch (axis) {
    Axis.horizontal => Offset(
        constraints[index].maxWidth,
        0,
      ),
    Axis.vertical => Offset(
        0,
        constraints[index].maxHeight,
      ),
  };

  return shift;
}