FractionallyAlignedSizedBox constructor

const FractionallyAlignedSizedBox({
  1. Key? key,
  2. required Widget child,
  3. double? leftFactor,
  4. double? topFactor,
  5. double? rightFactor,
  6. double? bottomFactor,
  7. double? widthFactor,
  8. double? heightFactor,
})

Creates a widget that positions its child to a fraction of the total available space.

Only two out of the three horizontal values (leftFactor, rightFactor, widthFactor), and only two out of the three vertical values (topFactor, bottomFactor, heightFactor), can be set. In each case, at least one of the three must be null.

If non-null, the widthFactor and heightFactor arguments must be non-negative.

Implementation

const FractionallyAlignedSizedBox({
  Key? key,
  required this.child,
  this.leftFactor,
  this.topFactor,
  this.rightFactor,
  this.bottomFactor,
  this.widthFactor,
  this.heightFactor,
})  : assert(
          leftFactor == null || rightFactor == null || widthFactor == null),
      assert(
          topFactor == null || bottomFactor == null || heightFactor == null),
      assert(widthFactor == null || widthFactor >= 0.0),
      assert(heightFactor == null || heightFactor >= 0.0),
      super(key: key);