Now that we've created a very basic user interface for our application, we will integrate the Dialogflow agent with the application so that the text that's entered by the user is responded to in real time by the agent. Follow these steps:
- To integrate Dialogflow in the application, we will use the Flutter plugin called flutter_dialogflow.
To explore this plugin, please go to https://pub.dartlang.org/packages/flutter_dialogflow.
Add the dependency to the plugin inside the pubspec.yaml file:
dependencies:
flutter_dialogflow: ^0.1.0
- Next, we need to install the dependency. This can be done either using the $ flutter pub get command-line argument or by clicking the option that appears on the screen. Here, we will use dialogflow_v2 so let's import the package inside our chat_screen.dart file:
import 'package...