updateChild method

  1. @protected
void updateChild(
  1. double shrinkOffset,
  2. bool overlapsContent

Update the child render object if necessary.

Called before the first layout, any time markNeedsLayout is called, and any time the scroll offset changes. The shrinkOffset is the difference between the maxExtent and the current size. Zero means the header is fully expanded, any greater number up to maxExtent means that the header has been scrolled by that much. The overlapsContent argument is true if the sliver's leading edge is beyond its normal place in the viewport contents, and false otherwise. It may still paint beyond its normal place if the minExtent after this call is greater than the amount of space that would normally be left.

The render object will size itself to the larger of (a) the maxExtent minus the child's intrinsic height and (b) the maxExtent minus the shrink offset.

When this method is called by layoutChild, the child can be set, mutated, or replaced. (It should not be called outside layoutChild.)

Any time this method would mutate the child, call markNeedsLayout.


void updateChild(double shrinkOffset, bool overlapsContent) { }