FractionallySizedBoxModifier constructor

const FractionallySizedBoxModifier({
  1. Key? key,
  2. Widget? child,
  3. AlignmentGeometry alignment = Alignment.center,
  4. double? widthFactor,
  5. double? heightFactor,
})

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

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

Implementation

const FractionallySizedBoxModifier({
  super.key,
  super.child,
  this.alignment = Alignment.center,
  this.widthFactor,
  this.heightFactor,
})  : assert(widthFactor == null || widthFactor >= 0.0),
      assert(heightFactor == null || heightFactor >= 0.0);