fromStream<T> static method
Signal<T?>
fromStream<T>(
- Stream<
T> stream, { - T? initialValue,
- String? debugLabel,
- bool autoDispose = false,
- bool cancelOnError = false,
- void onError(
- Object error,
- StackTrace stackTrace
- Function? onInit,
- Function? onValueUpdated,
- Function? onAfterBuild,
- Function? onDispose,
- bool debugTrace = false,
- Map<
String, dynamic> ? metadata,
Create a signal from a Stream.
Optionally accepts lifecycle callbacks that will be used as defaults when observing this signal (widget-level callbacks override these).
Implementation
static s.Signal<T?> fromStream<T>(
Stream<T> stream, {
T? initialValue,
String? debugLabel,
bool autoDispose = false,
bool cancelOnError = false,
void Function(Object error, StackTrace stackTrace)? onError,
Function? onInit,
Function? onValueUpdated,
Function? onAfterBuild,
Function? onDispose,
bool debugTrace = false,
Map<String, dynamic>? metadata,
}) =>
_signalFromStream<T>(
stream,
initialValue: initialValue,
debugLabel: debugLabel,
autoDispose: autoDispose,
cancelOnError: cancelOnError,
onError: onError,
onInit: onInit,
onValueUpdated: onValueUpdated,
onAfterBuild: onAfterBuild,
onDispose: onDispose,
debugTrace: debugTrace,
metadata: metadata,
);