getClip method
Returns a description of the clip given that the render object being clipped is of the given size.
Implementation
@override
Path getClip(Size size) {
var path = Path();
if (type == MessageType.SEND) {
path.addRRect(RRect.fromLTRBAndCorners(0, 0, size.width, size.height,
topLeft: Radius.circular(bubbleRadius),
bottomRight: Radius.circular(bubbleRadius)));
} else {
path.addRRect(RRect.fromLTRBAndCorners(0, 0, size.width, size.height,
topRight: Radius.circular(bubbleRadius),
bottomLeft: Radius.circular(bubbleRadius)));
}
path.close();
return path;
}