fix giphy borderradius

This commit is contained in:
Salvatore Giordano
2020-12-04 16:08:46 +01:00
parent 5365082e4a
commit e80a30dca4
+25 -19
View File
@@ -79,26 +79,32 @@ class GiphyAttachment extends StatelessWidget {
); );
})); }));
}, },
child: CachedNetworkImage( child: ClipRRect(
height: size?.height, borderRadius: BorderRadius.only(
width: size?.width, topLeft: Radius.circular(8),
placeholder: (_, __) { topRight: Radius.circular(8),
return Container( ),
width: size?.width, child: CachedNetworkImage(
height: size?.height, height: size?.height,
child: Center( width: size?.width,
child: CircularProgressIndicator(), placeholder: (_, __) {
), return Container(
); width: size?.width,
}, height: size?.height,
imageUrl: attachment.thumbUrl ?? child: Center(
attachment.imageUrl ?? child: CircularProgressIndicator(),
attachment.assetUrl, ),
errorWidget: (context, url, error) => AttachmentError( );
attachment: attachment, },
size: size, imageUrl: attachment.thumbUrl ??
attachment.imageUrl ??
attachment.assetUrl,
errorWidget: (context, url, error) => AttachmentError(
attachment: attachment,
size: size,
),
fit: BoxFit.cover,
), ),
fit: BoxFit.cover,
), ),
), ),
), ),