stevenroose / dart-eventsource

A client and server implementation of Server-Side Events.
MIT License
56 stars 51 forks source link

Dart 2 Error #5

Open thosakwe opened 5 years ago

thosakwe commented 5 years ago

I'm running Dart 2.0.0 on Mac, and trying to finish up https://github.com/angel-dart/eventsource. However, I get an error on startup. I think this should be pretty easy to patch up; would you mind if I sent in a PR to correct it?

Here's the error:

(virtualenv_py3) wg-dhcp201d207d109:eventsource thosakwe$ dart example/main.dart
file:///Users/thosakwe/.pub-cache/hosted/pub.dartlang.org/eventsource-0.2.0/lib/publisher.dart:109:23: Error: The argument type 'eventsource.src.proxy_sink::ProxySink<dynamic>' can't be assigned to the parameter type 'dart.core::Sink<eventsource.src.event::Event>'.
Try changing the type of the parameter, or casting the argument to 'dart.core::Sink<eventsource.src.event::Event>'.
        _cache.replay(sub, lastEventId, channel);
                      ^
stevenroose commented 5 years ago

PR would be very welcome. I can't see immediately what is going on, but I've been away from Dart for quite a while now..