performLayout method

  1. @override
void performLayout ()
override

This method has been overridden to eventually measure the size of new resizing intervals and to eventually adjust the scroll offset. If required by AnimatedSliverList.updateScrollableWhenResizing attribute, calls the _notifyScrollable method to update the scroll listeners when a resizing inerval is animating.

Implementation

@override
void performLayout() {
  _inPerformLayout = true;

  var resizing = false;
  final childConstraints = constraints.asBoxConstraints();
  for (var i in _intervals) {
    if (i.isInResizingState) {
      resizing = true;
      if (i._fromSize == null || i._toSize == null) {
        _measureIntervalSize(i, childConstraints);
      }
    }
  }

  super.performLayout();

  _inPerformLayout = false;

  childManager._adjustScrollOffset();

  if (resizing && widget.updateScrollableWhenResizing) _notifyScrollable();
}