This blog post describes how to integrate IBM's Watsonx Assistant chatbot into a Flutter web application. The goal is to allow users to interact with the chatbot only after they have successfully logged in.
The solution involves creating a JavaScript file that manages the loading and visibility of the chatbot. This file is linked in the web app's HTML. The Flutter app communicates with the JavaScript file to show or hide the chatbot based on the user's login status. When a user logs in, the app calls a JavaScript function to load the chatbot and pass the user's name. This name can be used by the chatbot for personalization. Conversely, logging out hides the chatbot and destroys its instance.
Checkout the full blog:
https://medium.com/ibm-data-ai/embedding-watsonx-assistant-in-flutter-web-app-59cd076df80d
Copy