Promise<T> useStreamPromise<T>(Stream<T> stream) { final snapshot = useStream(stream); return Promise.fromSnapshot(snapshot); }