title: Error on Dart Streams StreamTransformer int is not a subtype of EventSink<dynamic>
body: <p>Trying to learn Dart and generics now i have this code tring to learn about stream but i cants seem to get what is wrong with my code</p>
  
  <pre><code>import 'dart:async';
  
  void main() {
    StreamController&lt;int&gt; controller = new StreamController&lt;int&gt;();
  
    num i = 0;
  
    Future.doWhile(() {
      controller.add(i++);
  
      if (i == 100) {
        return false;
      }
      return true;
    });
  
    var result = controller.stream.transform(
        StreamTransformer&lt;int, EventSink&lt;dynamic&gt;&gt;.fromHandlers(
            handleData: (int number, EventSink&lt;dynamic&gt; sink) {
      if (number == 70) {
        sink.addError("Hit seventy");
      } else {
        sink.add(number);
      }
    }));
  
    result.listen((data) =&gt; print(data));
  }
  </code></pre>
  
  <p>The above code bring me the following error </p>
  
  <pre><code>type 'int' is not a subtype of type 'EventSink&lt;dynamic&gt;' of 'data'
  EventSinkWrapper.add (dart:async/stream_transformers.dart)
  main.&lt;anonymous closure&gt; (file:///var/www/html/learning/dart/rr.dart:23:12)
  HandlerEventSink.add (dart:async/stream_transformers.dart:228:7)
  SinkTransformerStreamSubscription._handleData (dart:async/stream_transformers.dart:120:24) 
  </code></pre>