DataSourceStreamable<T> class abstract

An abstract DataSource designed to provide a continuous stream of data of type T.

This class is used for Data Sources that need to push updates to the Repository layer as data changes over time (e.g., real-time database updates, persistent subscription handlers, or watching local storage).

It forms the basis for observable data patterns in the Clean Architecture.

  • T: The type of data items emitted by the stream.
Inheritance

Constructors

DataSourceStreamable()
An abstract DataSource designed to provide a continuous stream of data of type T.

Properties

hashCode → int
The hash code for this object.
no setterinherited
observer → SimpleObserver
Retrieves the standard observer instance used to track the lifecycle and events of all Data Sources in the application.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

dispose() → void
Called when the DataSource instance is no longer needed and should release any held resources (e.g., closing connections, unregistering listeners).
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
stream({required covariant Params params}) → Stream<T>
Returns a Stream that emits data of type T whenever the underlying data source changes.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited