calcOffset method

double calcOffset(
  1. Size size,
  2. Orientation orientation,
  3. int columnsCount
)

Calc the offset in pixels, for the screen and rotation config used actually in the device

Implementation

double calcOffset(Size size, Orientation orientation, int columnsCount) {
  final width = orientation == Orientation.landscape || kIsWeb
      ? size.width
      : size.height;

  final colWidth = width / columnsCount;
  //print("calcoffset offsets = $offsets, ");
  final orientedOffsets =
      orientation == Orientation.portrait ? offsets : offsetsLand;
  final result = colWidth * orientedOffsets[gridSize(size.width)]!;
  //print("calcoffset result = $result, ");
  return result;
}