whenTrue static method
Implementation
static Future<dynamic> whenTrue(Stream source) async {
await for (dynamic value in source) {
if (value != null) {
return value;
}
}
return null;
// stream exited without a true value, maybe return an exception.
}