onClick method

void onClick(
  1. void callback()
)

A method that sets the button press event handler.

Implementation

void onClick(void Function() callback) => Telegram.WebApp.SettingsButton.onClick(callback.toJS);