ConstraintsTransformBox constructor Null safety

const ConstraintsTransformBox(
  1. {Key? key,
  2. Widget? child,
  3. TextDirection? textDirection,
  4. AlignmentGeometry alignment = Alignment.center,
  5. required BoxConstraintsTransform constraintsTransform,
  6. Clip clipBehavior = Clip.none,
  7. String debugTransformType = ''}
)

Creates a widget that uses a function to transform the constraints it passes to its child. If the child overflows the parent's constraints, a warning will be given in debug mode.

The debugTransformType argument adds a debug label to this widget.

The alignment, clipBehavior and constraintsTransform arguments must not be null.

Implementation

const ConstraintsTransformBox({
  super.key,
  super.child,
  this.textDirection,
  this.alignment = Alignment.center,
  required this.constraintsTransform,
  this.clipBehavior = Clip.none,
  String debugTransformType = '',
}) : _debugTransformLabel = debugTransformType,
     assert(alignment != null),
     assert(clipBehavior != null),
     assert(constraintsTransform != null),
     assert(debugTransformType != null);