April 2020
Intermediate to advanced
380 pages
9h 24m
English
The query from the user and the response from the agent can be thought of as two different parts of a single component. We will create two different containers for them and then add them inside a single unit called ChatMessage. This will ensure that each query, along with its answer, appears in the same order as they were input by the user. We will start by creating a stateful widget called ChatMessage inside a new dart file called chat_message.dart. The following image shows the division of a ChatMesage into a query and a response:

To create the UI of the screen, follow these steps:
Read now
Unlock full access