-
Notifications
You must be signed in to change notification settings - Fork 18
Fix JsonDocumentTransformer.bind for dart 2 #18
Conversation
pubspec.yaml
Outdated
@@ -1,5 +1,5 @@ | |||
name: stream_channel | |||
version: 1.6.4 | |||
version: 1.6.4+5 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lmao, fixing...
CHANGELOG.md
Outdated
@@ -1,3 +1,8 @@ | |||
## 1.6.4+1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1.6.5
The +
build numbers are only used for pre-1.0.0 packages where the semantics of each version number are shifted to the right.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
var stream = channel.stream.map(_codec.decode); | ||
var sink = new StreamSinkTransformer.fromHandlers(handleData: (data, sink) { | ||
var sink = new StreamSinkTransformer.fromHandlers( | ||
handleData: (Object data, EventSink<String> sink) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style nit: I generally tend to prefer adding type parameters to the function rather than to callbacks being passed in to the function (e.g. new StreamSinkTransformer<Object, String>.fromHandlers(...)
). It saves on tokens (you don't have to write EventSink
explicitly) and makes it more obvious what the return type is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
@nex3 can you publish a version for me? I don't have rights on this package. |
Done. |
…-document-transformer-bind Fix JsonDocumentTransformer.bind for dart 2
Previously the local
sink
didn't get its generic type inferred properly and you would get runtime errors on certain operations which are difficult to track down.