useStreamController<T> function
StreamController<T> useStreamController<T>({
- boolsync =false,
- VoidCallback?onListen,
- VoidCallback?onCancel,
- List<
Object?> ?keys,
Creates aStreamController which is automatically disposed when necessary.
See also:
- StreamController, the created object
- useStream, to listen to the createdStreamController
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, ), );}