tightenAxis method

BoxConstraints tightenAxis(
  1. Axis axis, {
  2. double? cross,
  3. double? main,
})

Returns new box constraints with a tight main and/or cross axes.

Implementation

BoxConstraints tightenAxis(Axis axis, {double? cross, double? main}) {
  return axis == Axis.vertical
      ? tighten(width: cross, height: main)
      : tighten(width: main, height: cross);
}