customService only showing a bracket as argument?

I’m invoking a custom service in flutter like this

  await Backendless.customService
      .invoke('Auth', 'usernameTaken', {'username': username});

where username is just a string. I have verified the string to be exactly what I expect it to be client side, but on the server side, the argument is not what I expect it to be at all.

This is the log for the custom function.

I’ve created inner task to investigate the issue.
[BKNDLSS-24888]
We will post here about the progress.

Is there any update on this issue?

Hi, @jp19344

As soon as this ticket is ready we will let you know right away. Stay in touch.

Regards,
Marina

Hi @jp19344

Sorry for the late response. If the custom service method takes only one parameter, you should only pass the value of this parameter. So your code should look like this:

  await Backendless.customService.invoke('Auth', 'usernameTaken', username);

But for more then 1 parameter the Map is required. So, for example, if you have second parameter named ‘foo’, your code will look like this:

  await Backendless.customService
  .invoke('Auth', 'usernameTaken', {'username': username, 'foo': 'bar'});

This is caused by technical specifications of the system.

Best Regards,
Maksym