AS-Devs / signalr_flutter

A flutter plugin for .net SignalR client.
https://pub.dev/packages/signalr_flutter
MIT License
18 stars 28 forks source link

Hub methods with more than 5 arguments. #10

Closed Nismonick closed 4 years ago

Nismonick commented 4 years ago

I have tried editing the kotlin file "SignalR.kt" because i had methods with more than 5 arguments.

image

but i'm still getting the error

image

Do I need to rebuild that package? I really can't find the next logical step to continue with this. Am I missing something?

AyonAB commented 4 years ago

Check the dart code of that same method. There is a validation step for number of arguments. Edit that and you should be good to go.

itsthetaste commented 4 years ago

you could change the Kotlin code to

val res: SignalRFuture = hub.invoke(Any::class.java, methodName, *args.toTypedArray())

so that it spreads the list into vararg for you

AyonAB commented 4 years ago

Well, I didn't know that! Thanks. Will take a look. Cheers🥂