showConfirm method
Bot API 6.2+ A method that shows message in a simple confirmation window with 'OK' and 'Cancel' buttons. If an optional callback parameter was passed, the callback function will be called when the popup is closed and the first argument will be a boolean indicating whether the user pressed the 'OK' button.
Implementation
@override
void showConfirm(String message, [void Function(bool isOkPressed)? callback]) =>
Telegram.WebApp.showConfirm(message, callback?.toJS);