initialize<T> method
Registers a new communication channel into the global Channeler infrastructure. Channels must always be initialized before they can receive subscriptions or events, helping developers maintain safer communication flows and detect invalid channel usage during development.
Implementation
void initialize<T>(List<Channel<T>> channels) {
for (final channel in channels) {
if (_channels.containsKey(channel.name)) {
log("${channel.name} Channel Already Initialized", name: 'Channeler');
continue;
}
_channels[channel.name] = [];
}
}