invokeAsync abstract method

Future invokeAsync(
  1. String methodName, [
  2. List? args
])

Invokes a hub method on the server using the specified name and arguments.

The Future returned by this method resolves when the server indicates it has finished invoking the method. When the promise resolves, the server has finished invoking the method. If the server method returns a result, it is produced as the result of resolving the Future.

T The expected return type.

methodName The name of the server method to invoke.

args The arguments used to invoke the server method.

Returns a Future that resolves with the result of the server method (if any), or rejects with an error.

Implementation

Future<dynamic> invokeAsync(String methodName, [List<dynamic>? args]);