AxisSizedBox constructor

const AxisSizedBox({
  1. Key? key,
  2. required Axis axis,
  3. double? cross,
  4. double? main,
})

Creates a fixed size box. The cross and main parameters can be null to indicate that the size of the box should not be constrained in the corresponding dimension.

Implementation

const AxisSizedBox({
  Key? key,
  required Axis axis,
  double? cross,
  double? main,
}) : super(
  key: key,
  width: axis == Axis.vertical ? cross : main,
  height: axis == Axis.vertical ? main : cross,
);