I'm currently integrating Typesense into my Flutte...
# community-help
s
I'm currently integrating Typesense into my Flutter/Dart app. I'm using a Future to run the search. Is there anyway to set this up as a Stream? This is how Firestore updates and I'll need to add additional code to determine when to refresh versus just letting the Stream update a list of results
Copy code
Future<dynamic> searchInventoryIndex(accountId, selectedYear, searchKey,
      pageKey, pageSize, filterSelected) async {
j
CC: @Harpreet Sangar
h
Hi @Shane Jordan There's a
Stream.fromFuture
constructor that would emit an event when the future returns. https://api.flutter.dev/flutter/dart-async/Stream/Stream.fromFuture.html
s
i'll check it out, thanks!