SliverOffset.from constructor

SliverOffset.from(
  1. Offset offset, {
  2. Axis axis = Axis.vertical,
})

Creates an offset with cross and main extents.

Implementation

SliverOffset.from(Offset offset, {Axis axis = Axis.vertical})
    : cross = axis == Axis.vertical ? offset.dx : offset.dy,
      main = axis == Axis.vertical ? offset.dy : offset.dx,
      super(offset.dx, offset.dy);