getAbsoluteSize method
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:
- getAbsoluteSizeRelativeToOrigin, which returns the size relative to the leading edge of the sliver.
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);
}
}