useStreamController<T> function Null safety

StreamController<T> useStreamController<T>(
  1. {bool sync = false,
  2. VoidCallback? onListen,
  3. VoidCallback? onCancel,
  4. List<Object?>? keys}
)

Creates a StreamController automatically disposed.

See also:

Implementation

StreamController<T> useStreamController<T>({
  bool sync = false,
  VoidCallback? onListen,
  VoidCallback? onCancel,
  List<Object?>? keys,
}) {
  return use(
    _StreamControllerHook(
      onCancel: onCancel,
      onListen: onListen,
      sync: sync,
      keys: keys,
    ),
  );
}