Post with attachment

This commit is contained in:
2024-11-10 16:41:11 +08:00
parent 302691f557
commit ef51948fad
12 changed files with 191 additions and 50 deletions

View File

@ -14,9 +14,9 @@ class AttachmentItem extends StatelessWidget {
final sn = context.read<SnNetworkProvider>();
switch (tp) {
case 'image':
return AspectRatio(
aspectRatio: data.metadata['ratio']?.toDouble(),
child: UniversalImage(sn.getAttachmentUrl(data.rid)),
return UniversalImage(
sn.getAttachmentUrl(data.rid),
fit: BoxFit.cover,
);
default:
return const Placeholder();