resolveReverseOverlayAnchors static method
({Alignment followerAnchor, Alignment targetAnchor})
resolveReverseOverlayAnchors(
- Alignment align
we need to make that to reverse anchors
Implementation
static ({Alignment targetAnchor, Alignment followerAnchor}) resolveReverseOverlayAnchors(Alignment align) {
switch (align) {
case Alignment.topLeft:
return (targetAnchor: Alignment.topLeft, followerAnchor: Alignment.bottomLeft);
case Alignment.topCenter:
return (targetAnchor: Alignment.topCenter, followerAnchor: Alignment.bottomCenter);
case Alignment.topRight:
return (targetAnchor: Alignment.topRight, followerAnchor: Alignment.bottomRight);
case Alignment.centerLeft:
return (targetAnchor: Alignment.centerLeft, followerAnchor: Alignment.centerRight);
case Alignment.center:
return (targetAnchor: Alignment.center, followerAnchor: Alignment.center);
case Alignment.centerRight:
return (targetAnchor: Alignment.centerRight, followerAnchor: Alignment.centerLeft);
case Alignment.bottomLeft:
return (targetAnchor: Alignment.bottomLeft, followerAnchor: Alignment.topLeft);
case Alignment.bottomCenter:
return (targetAnchor: Alignment.bottomCenter, followerAnchor: Alignment.topCenter);
case Alignment.bottomRight:
return (targetAnchor: Alignment.bottomRight, followerAnchor: Alignment.topRight);
default:
return (targetAnchor: Alignment.bottomCenter, followerAnchor: Alignment.topCenter);
}
}