interactionFeedback method

Future<void> interactionFeedback(
  1. String interactionId,
  2. String? value,
  3. String? input,
  4. BuildContext context,
)

Implementation

Future<void> interactionFeedback(String interactionId, String? value,
    String? input, BuildContext context) async {
  if (socket == null || !socket!.connected) {
    Logs.debug("Cannot send feedback - socket not connected");
    Navigator.pop(context);
    return;
  }

  Logs.debug("//////////////////////// SUBMIT ////////////////");
  socket!.emit('event', {
    "interactionId": interactionId,
    "value": value,
    "input": input,
    "author": user.participantId,
    "authorType": 'customer',
    "type": 'default',
    "eventType": 'interaction-feedback',
    "appId": config.appId,
  });
  await SystemNavigator.pop();
}