streamTextEdit method

Stream<String> streamTextEdit(
  1. TextEditingController cont, [
  2. StreamController<String>? controller
])

Implementation

Stream<String> streamTextEdit(TextEditingController cont, [StreamController<String>? controller]) {
  final streamer = controller ?? StreamController<String>.broadcast();
  final listener = () {
    streamer.add(cont.text);
  };
  cont.addListener(listener);
  disposers.add(() => streamer.close());
  return streamer.stream;
}