getRight method
Get the right position of the widget
Implementation
double getRight() {
final box = key!.currentContext!.findRenderObject() as RenderBox;
final boxOffset = box.localToGlobal(const Offset(0.0, 0.0));
if (boxOffset.dx.isNaN) return padding.right;
final bottomRight =
box.size.bottomRight(box.localToGlobal(const Offset(0.0, 0.0)));
return bottomRight.dx + padding.right;
}