source to be a
source to be used at the new type, but at run-time it must satisfy the requirements of both the new type and its original type.
Data events created by the source stream must also be instances of
static Stream<T> castFrom<S, T>(Stream<S> source) => new CastStream<S, T>(source);
© 2012 the Dart project authors
Licensed under the Creative Commons Attribution-ShareAlike License v4.0.