getTopRight method Null safety

Offset getTopRight(
  1. Finder finder,
  2. {bool warnIfMissed = false,
  3. String callee = 'getTopRight'}
)

Returns the point at the top right of the given widget. This point is not inside the object's hit test area.

If warnIfMissed is true (the default is false), then the returned coordinate is checked to see if a hit test at the returned location would actually include the specified element in the HitTestResult, and if not, a warning is printed to the console.

The callee argument is used to identify the method that should be referenced in messages regarding warnIfMissed. It can be ignored unless this method is being called from another that is forwarding its own warnIfMissed parameter (see e.g. the implementation of tap).

Implementation

Offset getTopRight(Finder finder, { bool warnIfMissed = false, String callee = 'getTopRight' }) {
  return _getElementPoint(finder, (Size size) => size.topRight(Offset.zero), warnIfMissed: warnIfMissed, callee: callee);
}