Open nicobritos opened 2 years ago
The onMessage method tries to decode an already decoded json payload, throwing an exception.
onMessage
void onMessage(data) { final json = jsonDecode(data); if (json.containsKey('channel')) { eventHandler(json['event'], json['channel'], jsonDecode(json['data'])); } else { _eventCallbacks[json['event']]?.call(json['data'] ?? {}); } }
The
onMessage
method tries to decode an already decoded json payload, throwing an exception.