removeJavaScriptChannel method

  1. @override
Future<void> removeJavaScriptChannel(
  1. String javaScriptChannelName
)

Removes the JavaScript channel with the matching name from the set of enabled channels.

This disables the channel with the matching name if it was previously enabled through the addJavaScriptChannel.

Implementation

@override
Future<void> removeJavaScriptChannel(String javaScriptChannelName) async {
  assert(javaScriptChannelName.isNotEmpty);
  if (!_javaScriptChannelParams.containsKey(javaScriptChannelName)) {
    return;
  }
  await _resetUserScripts(removedJavaScriptChannel: javaScriptChannelName);
}