RenderFitHorizontally constructor

RenderFitHorizontally({
  1. double shrinkLimit = FitHorizontally.defaultShrinkLimit,
  2. bool fitsHeight = false,
  3. AlignmentGeometry alignment = Alignment.center,
  4. TextDirection? textDirection,
  5. RenderBox? child,
})

Scales and positions its child within itself.

The fit and alignment arguments must not be null.

Implementation

RenderFitHorizontally({
  double shrinkLimit = FitHorizontally.defaultShrinkLimit,
  bool fitsHeight = false,
  AlignmentGeometry alignment = Alignment.center,
  TextDirection? textDirection,
  RenderBox? child,
})  : assert(shrinkLimit <= 1.0),
      _shrinkLimit = shrinkLimit,
      _fitsHeight = fitsHeight,
      _alignment = alignment,
      _textDirection = textDirection,
      super(child);