off abstract method

void off(
  1. String methodName, [
  2. void method(
    1. List args
    )?
])

Removes the specified handler for the specified hub method.

You must pass the exact same Function instance as was previously passed to HubConnection.on. Passing a different instance (even if the function body is the same) will not remove the handler.

methodName The name of the method to remove handlers for. method The handler to remove. This must be the same Function instance as the one passed to HubConnection.on.

Implementation

void off(String methodName, [void Function(List<dynamic> args)? method]);