handleMethodCall method

Future handleMethodCall(
  1. MethodCall dCall
)

Implementation

Future<dynamic> handleMethodCall(MethodCall dCall) async {
  await loadWebBindings();

  switch (dCall.method) {
    case 'load':
      manifest = await promiseToFuture(load(dCall.arguments));
      return true;
    case 'getManifest':
      return manifest;
    case 'runRune':
      print("dcall ${dCall.arguments["lengths"]}");
      return await promiseToFuture(
          call(dCall.arguments["bytes"], dCall.arguments["lengths"]));
    case 'getLogs':
      return await promiseToFuture(getLogs());
    default:
      throw PlatformException(
        code: 'Unimplemented',
        details: 'runevm_fl for web doesn\'t implement \'${dCall.method}\'',
      );
  }
}