getLeft method

double getLeft()

Get the left position of the widget

Implementation

double getLeft() {
  final box = key!.currentContext!.findRenderObject() as RenderBox;
  final boxOffset = box.localToGlobal(const Offset(0.0, 0.0));
  if (boxOffset.dx.isNaN) return 0 - padding.left;
  final topLeft = box.size.topLeft(boxOffset);
  return topLeft.dx - padding.left;
}