I would like to wait for a bool to be true, then return from a Future, but I can't seem to make my Future to wait for the Stream.
Future<bool> ready() {
return new Future<bool>(() {
StreamSubscription readySub;
_readyStream.listen((aBool) {
if (aBool) {
return true;
}
});
});
}