braverhealth / phoenix-socket-dart

Cross-platform and stream-based implementation of Phoenix Sockets
https://pub.dev/packages/phoenix_socket
BSD 3-Clause "New" or "Revised" License
74 stars 37 forks source link

Update socket.dart #12

Closed carlosmobile closed 3 years ago

carlosmobile commented 3 years ago

Hello,

First of all thanks for your great work in this library.

Please, could you make channel parameters more flexible and update de String, String to String, dynamic?

I need this change to use this library in our app. I think is a simple change that not affect negatively to any library user.

matehat commented 3 years ago

@carlosmobile Sure! I think this was a mistake from me. That needed to support JSON-serializable objects so your type definition reflects that better.

Thanks for the your contribution!

matehat commented 3 years ago

Published in 0.4.7 !

carlosmobile commented 3 years ago

Amazing @matehat !!

carlosmobile commented 3 years ago

We need to change in fromsocket too, sorry.

I/flutter (10251): Exception: type '_InternalLinkedHashMap<String, dynamic>' is not a subtype of type 'Map<String, String>' I/flutter (10251): #0 PhoenixSocket.addChannel (package:phoenix_socket/src/socket.dart:335:21)