I need to calculate the distance from the bottom of a screen to a container.Is it possible to calculate distance from bottom of a screen to Container and distance from top of a screen to container in separately?
I got the distance from top like this,
RenderBox box = keyGlobal.currentContext!.findRenderObject() as RenderBox;
Offset position = box.localToGlobal(Offset.zero); //this is global position
double y = position.dy;
Is it possible to get distance from bottom?