updateJavascriptChannelsFromSet method

void updateJavascriptChannelsFromSet(
  1. Set<JavascriptChannel>? channels
)

Updates the set of JavascriptChannels with the new set.

Implementation

void updateJavascriptChannelsFromSet(Set<JavascriptChannel>? channels) {
  this.channels.clear();
  if (channels == null) {
    return;
  }

  for (final JavascriptChannel channel in channels) {
    this.channels[channel.name] = channel;
  }
}