I\'m trying to develop a TextField that update the data on a Firestore database when they change. It seems to work but I need to prevent the onChange event to fire multiple
Here is my solution
subject = new PublishSubject(); subject.stream .debounceTime(Duration(milliseconds: 300)) .where((value) => value.isNotEmpty && value.toString().length > 1) .distinct() .listen(_search);