add onLinkTap

This commit is contained in:
Deven Joshi
2021-04-23 15:11:26 +05:30
parent a42b3de6f4
commit 59cfbf7560
@@ -142,6 +142,7 @@ class MessageListView extends StatefulWidget {
this.onSystemMessageTap,
this.onAttachmentTap,
this.textBuilder,
this.onLinkTap,
}) : super(key: key);
/// Function used to build a custom message widget
@@ -237,6 +238,8 @@ class MessageListView extends StatefulWidget {
/// Customize the MessageWidget textBuilder
final void Function(BuildContext context, Message message) textBuilder;
final void Function(String link) onLinkTap;
@override
_MessageListViewState createState() => _MessageListViewState();
}
@@ -844,6 +847,7 @@ class _MessageListViewState extends State<MessageListView> {
FocusScope.of(context).unfocus();
},
textBuilder: widget.textBuilder,
onLinkTap: widget.onLinkTap,
);
}
@@ -1021,6 +1025,7 @@ class _MessageListViewState extends State<MessageListView> {
},
onAttachmentTap: widget.onAttachmentTap,
textBuilder: widget.textBuilder,
onLinkTap: widget.onLinkTap,
);
if (!message.isDeleted &&