StreamValuable<Output, Msg>.values constructor

StreamValuable<Output, Msg>.values(
  1. Valuable<Stream<Msg>> stream, {
  2. required Output errorValue,
  3. required Output doneValue,
  4. required Output initialData,
  5. bool evaluateWithContext = false,
})

Constructor to simplify the case when Output == Msg

Implementation

StreamValuable.values(
  Valuable<Stream<Msg>> stream, {
  required Output errorValue,
  required Output doneValue,
  required Output initialData,
  bool evaluateWithContext = false,
}) : this(
        stream,
        dataValue: (ValuableContext? context, Msg msg) => msg as Output,
        errorValue: (
          ValuableContext? context,
          Object error,
          StackTrace st,
        ) =>
            errorValue,
        doneValue: (
          ValuableContext? context,
        ) =>
            doneValue,
        initialData: initialData,
        evaluateWithContext: evaluateWithContext,
      );