from static method

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

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

Implementation

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