expand static method

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

Creates box constraints that expand to fill another box constraints.

If cross or main is given, the constraints will require exactly the given value in the given dimension.

Implementation

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