PulseStreamBuilder<T extends Object> class
A modern stream builder widget with type-safe state management.
Example:
PulseStreamBuilder(
stream: counterStream,
builder: (context, value) => Text('$value'),
errorBuilder: (context, error) => Text('Error: $error'),
loadingBuilder: (context) => CircularProgressIndicator(),
)
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- PulseStreamBuilder
Constructors
-
PulseStreamBuilder({Key? key, required Stream<
T> ? stream, required Widget builder(BuildContext context, T value), T? initialValue, Widget loadingBuilder(BuildContext context)?, Widget errorBuilder(BuildContext context, Object error, StackTrace? stackTrace)?, bool shouldRebuild(T previous, T current)?, void onData(T value)?, void onError(Object error, StackTrace? stackTrace)?}) -
const
Properties
- builder → Widget Function(BuildContext context, T value)
-
Builder for data state.
final
- errorBuilder → Widget Function(BuildContext context, Object error, StackTrace? stackTrace)?
-
Builder for error state.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- initialValue → T?
-
Initial value to display before stream emits.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- loadingBuilder → Widget Function(BuildContext context)?
-
Builder for loading/initial state.
final
- onData → void Function(T value)?
-
Callback when new data is received.
final
- onError → void Function(Object error, StackTrace? stackTrace)?
-
Callback when error is received.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- shouldRebuild → bool Function(T previous, T current)?
-
Callback to determine if widget should rebuild on new data.
Return true to rebuild, false to skip.
final
-
stream
→ Stream<
T> ? -
The stream to listen to.
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< PulseStreamBuilder< T> > -
Creates the mutable state for this widget at a given location in the tree.
override
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of DiagnosticsNode objects describing this node's
children.
inherited
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String -
Returns a string representation of this node and its descendants.
inherited
-
toStringShallow(
{String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a one-line detailed description of the object.
inherited
-
toStringShort(
) → String -
A short, textual description of this widget.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited