onEvent method
A method that sets the app event handler. Check the list of available events.
All events mapped to events of TelegramEvent WARNING: call offEvent method to unregister callback
Implementation
@override
void onEvent(TelegramEvent event) => Telegram.WebApp.onEvent(event.eventType.eventName, event.eventHandler);