showAlert method
Bot API 6.2+ A method that shows message in a simple alert with a 'Close' button. If an optional callback parameter was passed, the callback function will be called when the popup is closed.
Implementation
@override
void showAlert(String message, [void Function()? callback]) => Telegram.WebApp.showAlert(message, callback?.toJS);