sendFile method

void sendFile(
  1. File file, {
  2. String? caption,
})

Implementation

void sendFile(File file, {String? caption}) {
  teledart?.sendDocument(chatId ?? TelegramBot.chatId, file, caption: caption).whenComplete(() {
    showToast("send success");
  }).catchError((error) {
    showToast(error.toString());
  });
}