useStreamHandler<T extends Object, R> function

void useStreamHandler<T extends Object, R>(
  1. Stream<R> select(
    1. T
    ),
  2. void handler(
    1. BuildContext context,
    2. AsyncSnapshot<R> newValue,
    3. void cancel()
    ), {
  3. required R initialValue,
  4. String? instanceName,
  5. bool preserveState = true,
})

Implementation

void useStreamHandler<T extends Object, R>(
    Stream<R> Function(T) select,
    void Function(BuildContext context, AsyncSnapshot<R> newValue,
            void Function() cancel)
        handler,
    {required R initialValue,
    String? instanceName,
    bool preserveState = true}) {
  return use(_WatchStreamHook<T, R>(
    initialValue: initialValue,
    select: select,
    handler: handler,
    instanceName: instanceName,
    preserveState: preserveState,
  ));
}