crossFrom static method

Size crossFrom(
  1. Axis axis,
  2. double extent
)

Creates a Size with the given cross axis extent and an infinite main axis extent.

Implementation

static Size crossFrom(Axis axis, double extent) {
  return axis == Axis.vertical ?
    Size(extent, double.infinity) :
    Size(double.infinity, extent);
}