getAbsoluteSize method

  1. @protected
Size getAbsoluteSize ()
@protected

This returns the absolute Size of the sliver.

The dimensions are always positive and calling this is only valid after layout has completed.

See also:

Implementation

@protected
Size getAbsoluteSize() {
  assert(geometry != null);
  assert(!debugNeedsLayout);
  switch (constraints.axisDirection) {
    case AxisDirection.up:
    case AxisDirection.down:
      return Size(constraints.crossAxisExtent, geometry.paintExtent);
    case AxisDirection.right:
    case AxisDirection.left:
      return Size(geometry.paintExtent, constraints.crossAxisExtent);
  }
  return null;
}