emitUpdate method

void emitUpdate(
  1. Update update
)

Emits update events

Implementation

void emitUpdate(Update update) {
  if (update.message != null) {
    _messageStreamController.add(update.message!);
  } else if (update.editedMessage != null) {
    _editedMessageStreamController.add(update.editedMessage!);
  } else if (update.channelPost != null) {
    _channelPostStreamController.add(update.channelPost!);
  } else if (update.editedChannelPost != null) {
    _editedChannelPostStreamController.add(update.editedChannelPost!);
  } else if (update.inlineQuery != null) {
    _inlineQueryStreamController.add(update.inlineQuery!);
  } else if (update.chosenInlineResult != null) {
    _chosenInlineResultStreamController.add(update.chosenInlineResult!);
  } else if (update.callbackQuery != null) {
    _callbackQueryStreamController.add(update.callbackQuery!);
  } else if (update.shippingQuery != null) {
    _shippingQueryStreamController.add(update.shippingQuery!);
  } else if (update.preCheckoutQuery != null) {
    _preCheckoutQueryStreamController.add(update.preCheckoutQuery!);
  } else if (update.poll != null) {
    _pollStreamController.add(update.poll!);
  } else if (update.pollAnswer != null) {
    _pollAnswerStreamController.add(update.pollAnswer!);
  } else if (update.myChatMember != null) {
    _myChatMemberStreamController.add(update.myChatMember!);
  } else if (update.chatMember != null) {
    _chatMemberStreamController.add(update.chatMember!);
  } else if (update.chatJoinRequest != null) {
    _chatJoinRequestStreamController.add(update.chatJoinRequest!);
  } else {
    throw TeleDartEventException('Receieved unrecognised update');
  }
}