whenTrue static method

Future whenTrue(
  1. Stream source
)

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.
}