LimitedRenderWrap constructor

LimitedRenderWrap({
  1. List<RenderBox>? children,
  2. double spacing = 0.0,
  3. double runSpacing = 0.0,
  4. Clip clipBehavior = Clip.none,
  5. int? maxLines,
  6. bool isLimited = true,
})

Implementation

LimitedRenderWrap({
  List<RenderBox>? children,
  double spacing = 0.0,
  double runSpacing = 0.0,
  Clip clipBehavior = Clip.none,
  int? maxLines,
  bool isLimited = true,
})  : _spacing = spacing,
      _runSpacing = runSpacing,
      _maxLines = maxLines,
      _isLimited = isLimited,
      _clipBehavior = clipBehavior {
  // Validate: if maxLines is set, isLimited must be true
  assert(
    maxLines == null || isLimited,
    'When maxLines is set, isLimited must be true. '
    'Use isLimited: false only with maxLines: null for unlimited mode without button.',
  );
  addAll(children);
}