feat: exposed textbuilder callback (#367)
* exposed textbuilder callback * exposed textbuilder callback
This commit is contained in:
@@ -141,6 +141,7 @@ class MessageListView extends StatefulWidget {
|
|||||||
this.onMessageTap,
|
this.onMessageTap,
|
||||||
this.onSystemMessageTap,
|
this.onSystemMessageTap,
|
||||||
this.onAttachmentTap,
|
this.onAttachmentTap,
|
||||||
|
this.textBuilder,
|
||||||
}) : super(key: key);
|
}) : super(key: key);
|
||||||
|
|
||||||
/// Function used to build a custom message widget
|
/// Function used to build a custom message widget
|
||||||
@@ -233,6 +234,9 @@ class MessageListView extends StatefulWidget {
|
|||||||
// Customize onTap on attachment
|
// Customize onTap on attachment
|
||||||
final void Function(Message message, Attachment attachment) onAttachmentTap;
|
final void Function(Message message, Attachment attachment) onAttachmentTap;
|
||||||
|
|
||||||
|
// Customize the MessageWidget textBuilder
|
||||||
|
final void Function(BuildContext context, Message message) textBuilder;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
_MessageListViewState createState() => _MessageListViewState();
|
_MessageListViewState createState() => _MessageListViewState();
|
||||||
}
|
}
|
||||||
@@ -839,6 +843,7 @@ class _MessageListViewState extends State<MessageListView> {
|
|||||||
}
|
}
|
||||||
FocusScope.of(context).unfocus();
|
FocusScope.of(context).unfocus();
|
||||||
},
|
},
|
||||||
|
textBuilder: widget.textBuilder,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1015,6 +1020,7 @@ class _MessageListViewState extends State<MessageListView> {
|
|||||||
FocusScope.of(context).unfocus();
|
FocusScope.of(context).unfocus();
|
||||||
},
|
},
|
||||||
onAttachmentTap: widget.onAttachmentTap,
|
onAttachmentTap: widget.onAttachmentTap,
|
||||||
|
textBuilder: widget.textBuilder,
|
||||||
);
|
);
|
||||||
|
|
||||||
if (!message.isDeleted &&
|
if (!message.isDeleted &&
|
||||||
|
|||||||
Reference in New Issue
Block a user