Hide attachments list on article

This commit is contained in:
2025-07-03 01:06:01 +08:00
parent a20c2598fc
commit ee72d79c93
5 changed files with 60 additions and 19 deletions

View File

@ -15,6 +15,7 @@ class AttachmentPreview extends StatelessWidget {
final double? progress;
final Function(int)? onMove;
final Function? onDelete;
final Function? onInsert;
final Function? onRequestUpload;
const AttachmentPreview({
super.key,
@ -23,6 +24,7 @@ class AttachmentPreview extends StatelessWidget {
this.onRequestUpload,
this.onMove,
this.onDelete,
this.onInsert,
});
@override
@ -166,6 +168,18 @@ class AttachmentPreview extends StatelessWidget {
onMove?.call(1);
},
),
if (onInsert != null)
InkWell(
borderRadius: BorderRadius.circular(8),
child: const Icon(
Symbols.add,
size: 14,
color: Colors.white,
).padding(horizontal: 8, vertical: 6),
onTap: () {
onInsert?.call();
},
),
],
),
),