diff --git a/lib/src/helpers.dart b/lib/src/helpers.dart index c59cdfb..c770e6f 100644 --- a/lib/src/helpers.dart +++ b/lib/src/helpers.dart @@ -19,12 +19,12 @@ String getSubProtocol(Serializer serializer) { String wampErrorString(Error err) { String errStr = err.uri; - if (err.args.isNotEmpty) { - String args = err.args.map((arg) => arg.toString()).join(", "); + if (err.args != null) { + String args = err.args!.map((arg) => arg.toString()).join(", "); errStr += ": $args"; } - if (err.kwargs.isNotEmpty) { - String kwargs = err.kwargs.entries.map((entry) => "${entry.key}=${entry.value}").join(", "); + if (err.kwargs != null) { + String kwargs = err.kwargs!.entries.map((entry) => "${entry.key}=${entry.value}").join(", "); errStr += ": $kwargs"; } return errStr; diff --git a/lib/src/joiner.dart b/lib/src/joiner.dart index 54240a6..716d918 100644 --- a/lib/src/joiner.dart +++ b/lib/src/joiner.dart @@ -23,7 +23,7 @@ class WAMPSessionJoiner { WebSocketChannel channel = webSocketChannel(uri, getSubProtocol(_serializer)); await channel.ready; - final joiner = Joiner(realm, _serializer, _authenticator); + final joiner = Joiner(realm, serializer: _serializer, authenticator: _authenticator); channel.sink.add(joiner.sendHello()); var welcomeCompleter = Completer();