Custom Messages HELP #311
-
Hey all, Beginner with Flutter here, but looking for an example of building and then displaying a customMessage. I am attempting to using customMessageBuilder to display 3 buttons within a chat bubble that will be used in our Chatbot as multiple choice response options. I am just looking for the simplest example of a custom message type using metadata and altering the way it displays with additional widgets. Please and thank you in advance! |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 5 replies
-
Hi, working on the same implementation, right now I'm using metadata to pass on the chat options and then using this data to build my custom buttons in the bubble |
Beta Was this translation helpful? Give feedback.
-
Hi, SwiftyFlow First I create my meta data according to the type of message I need to display using a converter function (CustomMetaData.fromStep(step))
Then, in my custom Message Builder I return the respective widget using the 'childType' property I defined in my CustomMetaData, in my case there is a list of radio buttons
|
Beta Was this translation helpful? Give feedback.
-
Thanks to you both sadly my noob way to code (10 years of Xcode experience) doesn't understand yours, above not really helping. There is always something further down missing or incompatible + I don't get why I cannot extend any class to work inside my project and not alter the git (gonna do one pub get in 6 months and it will wipe all I have done) + being constantly alerted about altering git + having 0 code suggestion/verification until Run + having to restart every single time I alter one bit. Weird not to find a complete clear example, it's super cool and I was super impressed to have it to work straight off with the messages.json provided and it was as easy to make my server messages flow into it but then I'm turning in circles just to add a button into one classic text message to showModalBottomSheet()... Last screen of the app, such a shame as even the pop up goal is achieved but I have no way to show a button onto a message. |
Beta Was this translation helpful? Give feedback.
All working now 🎉