offset property Null safety
Returns the global offset to the upper left corner of the attached widget's RenderObject, in logical units.
Offset is the offset of the transformed widget in global coordinates.
Implementation
Offset get offset {
assert(
context != null,
"Tried to get the offset of a focus node that didn't have its context set yet.\n"
'The context needs to be set before trying to evaluate traversal policies. '
'Setting the context is typically done with the attach method.',
);
final RenderObject object = context!.findRenderObject()!;
return MatrixUtils.transformPoint(object.getTransformTo(null), object.semanticBounds.topLeft);
}