You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey!
I was playing around with rxdart and faced a problem.
When throttleTime is used then the stream ignores the close command.
Is that by design or I'm doing sth wrong?
I use the latest versions of rxdart (0.27.7)/flutter (3.3.10) :-)
// WORKS
main() async {
final c =StreamController<String>();
Future.delayed(Duration(seconds:5)).then((f) => c.close());
final s = c.stream;
print("start");
awaitfor (var _ in s) {
print("loop");
}
print("end");
}
// WORKS
main() async {
final c =StreamController<String>();
Future.delayed(Duration(seconds:5)).then((f) => c.close());
final s = c.stream.debounceTime(Duration(seconds:1));
print("start");
awaitfor (var _ in s) {
print("loop");
}
print("end");
}
// DOESN'T WORK, NEVER REACHES THE END
main() async {
final c =StreamController<String>();
Future.delayed(Duration(seconds:5)).then((f) => c.close());
final s = c.stream.throttleTime(Duration(seconds:1));
print("start");
awaitfor (var _ in s) {
print("loop");
}
print("end");
}
The text was updated successfully, but these errors were encountered:
aurokk
changed the title
throttle ignores stream close
throttletime ignores stream close
Jan 13, 2023
aurokk
changed the title
throttletime ignores stream close
throttled stream ignores the close command
Jan 13, 2023
Hey!
I was playing around with rxdart and faced a problem.
When throttleTime is used then the stream ignores the close command.
Is that by design or I'm doing sth wrong?
I use the latest versions of rxdart (0.27.7)/flutter (3.3.10) :-)
// WORKS
// WORKS
// DOESN'T WORK, NEVER REACHES THE END
The text was updated successfully, but these errors were encountered: