answer method

Future<bool> answer(
  1. bool ok, {
  2. String? errorMessage,
})

Answer the recieved pre-checkout query

A wrapper around TeleDart.answerPreCheckoutQuery. On success, returns true.

It can take a bool that indicates if the pre-checkout is possible, and an errorMessage that is shown to user if ok is false (You don't have to specify it if ok is true).

Check Telegram API documentation for more information about those options.

Implementation

Future<bool> answer(bool ok, {String? errorMessage}) =>
    _teledart.answerPreCheckoutQuery(id, ok, errorMessage: errorMessage);