fix attachment border radius

This commit is contained in:
Salvatore Giordano
2021-03-16 13:47:46 +01:00
parent 4cda0c9435
commit 7a8fe4aa78
4 changed files with 54 additions and 29 deletions
@@ -356,15 +356,19 @@ Widget wrapAttachmentWidget(
Widget attachmentWidget,
ShapeBorder attachmentShape,
bool reverse,
BorderRadius borderRadius,
) {
return Material(
clipBehavior: Clip.antiAlias,
shape: attachmentShape,
type: MaterialType.transparency,
child: Transform(
transform: Matrix4.rotationY(reverse ? pi : 0),
alignment: Alignment.center,
child: attachmentWidget,
return ClipRRect(
borderRadius: borderRadius,
child: Material(
clipBehavior: Clip.antiAlias,
shape: attachmentShape,
type: MaterialType.transparency,
child: Transform(
transform: Matrix4.rotationY(reverse ? pi : 0),
alignment: Alignment.center,
child: attachmentWidget,
),
),
);
}