Flutter and DialogFlow Chatbot

Viewed 793

I am trying to make a chatbot for my Flutter app using DialogFlow. At first I used the API V2, and I get this error : First error

I searched online, and the only answer I found is to switch to "flutter_dialogflow.dart" package instead of the "dialogflow_v2.dart" package everything seemed to work just fine at the first glance, but when I wrote "Hi how are you doing?" the flowing error appears:

Second error P.S: Everything is activated on DialogFlow Please help! Thank you

1 Answers

Flutter has many advantages so the Flutter apps implementation will be common. Integrating the Dialogflow on the flutter app will be more beneficial and helps to handle the end-user queries most effectively. There are two approaches to incorporating Dialogflow into your Flutter APP.

  1. Create the middleware code and build your own chat UI

Using the REST API, the middleware code is responsible for transferring the message from the Flutter app to the Dialogflow agent and build UI components to send and receive the message. You will probably be really happy to only see text messages going back and forth when you get started. But finally, you may want to add rich answers, such as buttons, clickable hyperlinks, cards, and other rich answers like that. Dialogflow does not as it turns out, has any defaults on this front. Which is a tedious process

  1. Integrate with the Third-party tools

Since Dialogflow does not support the UI to make the bot response, search the platform that will allow you to add the bot to your mobile application. And I recommend using Kommunicate

The Dialogflow bot can be directly integrated with kommunicate and positioned with Flutter by adding Kommunicate dependency pubspec.yaml and import as well as install the package, More detailed instruction can be found here. You can further customise the chat widget to match your APP colours and theme.

PS: I work for Kommunicate

Related