2024-05-18 14:23:36 +00:00
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:solian/models/attachment.dart';
|
|
|
|
import 'package:solian/services.dart';
|
|
|
|
|
|
|
|
class AttachmentItem extends StatelessWidget {
|
|
|
|
final Attachment item;
|
|
|
|
|
|
|
|
const AttachmentItem({super.key, required this.item});
|
|
|
|
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
return Hero(
|
|
|
|
tag: Key('a${item.uuid}'),
|
|
|
|
child: Image.network(
|
2024-05-20 15:11:26 +00:00
|
|
|
'${ServiceFinder.services['paperclip']}/api/attachments/${item.id}',
|
2024-05-18 14:23:36 +00:00
|
|
|
fit: BoxFit.cover,
|
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|