yield* FirebaseFirestore.instance
Is giving
The type 'Future<QuerySnapshot>' implied by the 'yield' expression must be assignable to 'Stream<QuerySnapshot>'
The class
class SearchService {
Stream<QuerySnapshot> searchByName(
String searchField, BuildContext context) async* {
final uid = await TheProvider.of(context).auth.getCurrentUID();
yield* FirebaseFirestore.instance
.collection("userData")
.doc(uid)
.collection("Contacts")
.where('searchKey',
isEqualTo: searchField.substring(0, 1).toUpperCase())
.get();
}
}
I'm quite sure why, does anyone know how one would go about rectifying this?