removeJavaScriptHandler method Null safety

JavaScriptHandlerCallback? removeJavaScriptHandler(
  1. {required String handlerName}

Removes a JavaScript message handler previously added with the addJavaScriptHandler() associated to handlerName key. Returns the value associated with handlerName before it was removed. Returns null if handlerName was not found.

Supported Platforms/Implementations:

  • Android native WebView
  • iOS


JavaScriptHandlerCallback? removeJavaScriptHandler(
    {required String handlerName}) {
  return this.javaScriptHandlersMap.remove(handlerName);