sendToProvider method

Future<JavaScriptMessage> sendToProvider({
  1. required Enum method,
  2. List? params,
})

Returns

Implementation

Future<JavaScriptMessage> sendToProvider(
    {required Enum method, List<dynamic>? params}) async {
  MagicRPCRequest<List<dynamic>> request = MagicRPCRequest<List<dynamic>>(
      method: toShortString(method), params: params ?? []);
  return provider.send(
      request: request, completer: Completer<JavaScriptMessage>());
}