added customisation options for attachment actions modal and related widgets

This commit is contained in:
Deven Joshi
2021-11-15 17:18:30 +05:30
parent a3cce7ffff
commit 3a04e4f390
3 changed files with 132 additions and 72 deletions
@@ -33,6 +33,10 @@ class FullScreenMedia extends StatefulWidget {
this.startIndex = 0,
String? userName,
this.onShowMessage,
this.showReply = true,
this.showShowInChat = true,
this.showSave = true,
this.showDelete = true,
}) : userName = userName ?? '',
super(key: key);
@@ -51,6 +55,18 @@ class FullScreenMedia extends StatefulWidget {
/// Callback for when show message is tapped
final ShowMessageCallback? onShowMessage;
/// Show reply option
final bool showReply;
/// Show show in chat option
final bool showShowInChat;
/// Show save option
final bool showSave;
/// Show delete option
final bool showDelete;
@override
_FullScreenMediaState createState() => _FullScreenMediaState();
}
@@ -196,6 +212,10 @@ class _FullScreenMediaState extends State<FullScreenMedia>
StreamChannel.of(context).channel,
);
},
showReply: widget.showReply,
showShowInChat: widget.showShowInChat,
showSave: widget.showSave,
showDelete: widget.showDelete,
),
if (!widget.message.isEphemeral)
GalleryFooter(