You start with a
Chat widget that will render a chat. It has 3 required parameters:
messages- an array of messages to be rendered. Accepts abstract message, see types. If you have your message types you will need to map those to any of the defined ones. Let us know if we need to add more message types or add more fields to the existing ones.
onSendPressed- a function that will have a partial text message as a parameter. See types for more info on how types are structured. From the partial text message you need to create a text message which will at least have
text, this is done by you because we wanted to give you more control over those values.
user- a User class, that has only one required field - an
id, used to determine the message author.
Below you will find a drop-in example of the chat with only text messages.
Try to write any URL, for example,
flyer.chat, it should be unwrapped in a rich preview.
To check all supported parameters see API reference.