RepositoryDataSourceStreamable<ValueType, DS extends DataSourceStreamable<ValueType> > class
abstract
A specialized Repository that manages a Stream of data from a DataSourceStreamable.
Unlike "Callable" repositories that handle a single request/response cycle, this repository establishes a continuous data flow. It is ideal for reactive features like real-time updates, chat applications, or database listeners.
Generic Types:
ValueType: The type of data emitted by the stream.DS: A DataSourceStreamable that provides the actual stream.
- Inheritance
-
- Object
- Repository
- RepositoryDataSource<
DS> - RepositoryDataSourceStreamable
Constructors
- RepositoryDataSourceStreamable({required DS dataSource})
-
Creates a RepositoryDataSourceStreamable with the provided
dataSource.
Properties
- dataSource → DS
-
The DataSource instance used by this repository to fetch or persist data.
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- observer → RepositoryDataSourceStreamableObserver
-
The observer responsible for monitoring stream lifecycle events
(start, data, error, etc.).
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
dispose(
) → void -
Frees up resources and notifies the observer.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
stream(
{required covariant Params params}) → Stream< ValueType> - Returns a Stream provided by the dataSource.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited