public _Diagonal( _CornerId beginId, _CornerId endId) { this.beginId = beginId; this.endId = endId; }
Offset _cornerFor(Rect rect, _CornerId id) { switch (id) { case _CornerId.topLeft: return(rect.topLeft); case _CornerId.topRight: return(rect.topRight); case _CornerId.bottomLeft: return(rect.bottomLeft); case _CornerId.bottomRight: return(rect.bottomRight); } return(Offset.zero); }