onUpdateChatAPIEvent method

dynamic onUpdateChatAPIEvent(
  1. UpdateChatAPIEvent event,
  2. dynamic emit
)

Implementation

onUpdateChatAPIEvent(UpdateChatAPIEvent event, emit) {
  if (event.status == Status.error) {
    return emit(UpdateMessageFailedState(event.id, event.status));
  } else {
    return emit(UpdateMessageSuccessState(event.id, event.status));
  }
}