calcTop method

  1. @override
num calcTop(
  1. Rectangle<num> sourceRect, [
  2. Rectangle<num>? contentRect
])
override

Returns the calculated y position from sourceRect.

If contentRect is provided, it is considered to be the size of the content being aligned if it were visible.

Implementation

@override
num calcTop(Rectangle sourceRect, [Rectangle? contentRect]) {
  return sourceRect.top - contentRect!.height;
}