calcOffset method
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;
}