subscribeChannel<T> method

void subscribeChannel<T>(
  1. Channel<T> channel,
  2. ChannelerCallback<T> listener
)

Registers a listener callback for the provided communication channel directly from the current widget context. This method simplifies event subscriptions inside widgets while still maintaining all validation and safety checks implemented internally by the Channeler system.

Implementation

void subscribeChannel<T>(Channel<T> channel, ChannelerCallback<T> listener) {
  channeler.subscribe(channel, listener);
}