CannotLayoutSliverError constructor

CannotLayoutSliverError({
  1. required BaseBoxyDelegate<Object, BaseBoxyChild> delegate,
  2. required RenderBoxyMixin<RenderObject, BaseBoxyParentData<RenderObject>, BaseBoxyChild> render,
  3. required BaseBoxyChild child,
})

Constructs an inflation error given the delegate and RenderObject.

Implementation

CannotLayoutSliverError({
  required this.delegate,
  required this.render,
  required this.child,
}) : super.fromParts([
        ErrorSummary(
            'The $delegate boxy attempted to lay out a sliver during a dry layout.'),
        ErrorDescription(
          'Slivers in Flutter do not support dry layouts, so it is not possible to '
          'lay them out during a dry layout pass.',
        ),
        ErrorDescription(
          "If your boxy's size does not depend on the size of the sliver you "
          'can skip calling layout when `isDryLayout` is true.',
        ),
      ]);