RenderAligningShiftedBox constructor Null safety

RenderAligningShiftedBox(
  1. {AlignmentGeometry alignment = Alignment.center,
  2. required TextDirection? textDirection,
  3. RenderBox? child}
)

Initializes member variables for subclasses.

The alignment argument must not be null.

The textDirection must be non-null if the alignment is direction-sensitive.

Implementation

RenderAligningShiftedBox({
  AlignmentGeometry alignment = Alignment.center,
  required TextDirection? textDirection,
  RenderBox? child,
}) : assert(alignment != null),
     _alignment = alignment,
     _textDirection = textDirection,
     super(child);