From ecaba6ebb98b32023cff3b6cf650e9ec2a9984dd Mon Sep 17 00:00:00 2001 From: Deven Joshi Date: Wed, 17 Nov 2021 14:04:39 +0530 Subject: [PATCH] added custom actions --- .../lib/src/attachment_actions_modal.dart | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/packages/stream_chat_flutter/lib/src/attachment_actions_modal.dart b/packages/stream_chat_flutter/lib/src/attachment_actions_modal.dart index 7b9f0d51..0c10ae46 100644 --- a/packages/stream_chat_flutter/lib/src/attachment_actions_modal.dart +++ b/packages/stream_chat_flutter/lib/src/attachment_actions_modal.dart @@ -394,14 +394,21 @@ class _DownloadProgress { int get toPercentage => (received * 100) ~/ total; } +/// Class for custom attachment action class AttachmentAction { - String actionTitle; - Widget icon; - VoidCallback onTap; - + /// Constructor for custom attachment action AttachmentAction({ required this.actionTitle, required this.icon, required this.onTap, }); + + /// Title for the attachment action + String actionTitle; + + /// Icon for the attachment action + Widget icon; + + /// Callback for when the action is tapped + VoidCallback onTap; }