diff --git a/example/lib/pages/components/comment.dart b/example/lib/pages/components/comment.dart index 5fd2a66..3c74281 100644 --- a/example/lib/pages/components/comment.dart +++ b/example/lib/pages/components/comment.dart @@ -23,9 +23,13 @@ class _CommentDemoState extends State { author: 'John Doe', downloadCallback: () {}, comment: 'This is a comment', - onReply: () {}, + onReply: () { + print('reply'); + }, replySemanticLabel: 'Reply to comment', - onDelete: () {}, + onDelete: () { + print('delete'); + }, deleteSemanticLabel: 'Delete', timeStamp: '09:30 AM', attachment: ZdsChatAttachment( diff --git a/lib/src/components/molecules/comment.dart b/lib/src/components/molecules/comment.dart index ed604d7..d896941 100644 --- a/lib/src/components/molecules/comment.dart +++ b/lib/src/components/molecules/comment.dart @@ -112,7 +112,7 @@ class ZdsComment extends StatelessWidget { ZdsSlidableAction( icon: ZetaIcons.delete, semanticLabel: deleteSemanticLabel, - onPressed: (_) {}, + onPressed: (_) => onDelete!(), backgroundColor: colors.surfaceNegativeSubtle, foregroundColor: colors.error, ), diff --git a/lib/src/components/organisms/chat/message_input.dart b/lib/src/components/organisms/chat/message_input.dart index d025dba..f775d3d 100644 --- a/lib/src/components/organisms/chat/message_input.dart +++ b/lib/src/components/organisms/chat/message_input.dart @@ -29,7 +29,7 @@ class ZdsMessageInput extends StatefulWidget { this.allowVoiceNotes = false, super.key, }) : assert( - allowVoiceNotes && voiceNoteFileName != null, + (allowVoiceNotes && voiceNoteFileName != null) || !allowVoiceNotes, 'A value for voiceNoteFileName must be provided if allowVoiceNotes is enabled', );