convert function
Implementation
Stream<Resource<OtherClass>> convert(Stream<SomeClass> toConvert) async* {
yield Loading(EmptyOtherClass());
await for (final someObject in toConvert) {
try {
final OtherClass converted = convertToSomeObject(someObject);
yield Success(converted);
} catch (e) {
yield Failure.fromMessage("Failed convert '$someObject'");
}
}
}