I have two widgets that I drag across the screen using gesturedetector. I am aware of the method rect.contains(rect) to tell if widgets overlap, but how can I tell if a rect/widget hit the bottom of another one and if the left or right of both rects are aligned?
Rect rect1 = Rect.fromLTRB(top,left,right,bottom);
Rect rect2 = Rect.fromLTRB(top,left,right,bottom);
if (rect1.contains(Offset)){
}
//what I want to know is:
if (rect1.bottom.collidesWith(rect2.bottom)){
}