useStreamController<T> function
Creates a StreamController.
The controller is automatically closed when the widget is unmounted.
Implementation
StreamController<T> useStreamController<T>({
bool sync = false,
}) {
final c = StreamController<T>(sync: sync);
onBeforeUnmount(c.close);
return c;
}