RecordDataService<RType, KType> class abstract

Mixed in types
Implementers
Available Extensions

Constructors

RecordDataService()
RecordDataService.of({required KeyMapper<RType, KType> idMapper, required RecordLoader<RType, KType> loader})
factory

Properties

changeStream Stream<RType>
no setter
dataStream Stream<RType>
Returns all changes/loads use changeStream if you only want updates
no setter
hashCode int
The hash code for this object.
no setterinherited
loadedRecords Iterable<RType?>
no setter
log → Logger
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
userStateStream Stream<AuthUserProfile>
no setteroverride

Methods

addToStream(RType? record, {bool isLoad = false, bool silent = false}) → void
dispose() Future
inherited
doShutdown() Future
override
exec<R>(R block()) → R
inherited
getIdForRecord(RType record) → KType
Returns the key that will be used to key the results
getRecord(KType recordId) Future<RType?>
getService(KType recordId) DataService<RType>?
internalFetchRecord(KType id) Future<RType>
Retrieves the latest copy of the data from an external source
isInitialized(KType recordId) bool
isLoaded(KType recordId) bool
isShuttingDown() bool
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onLogin(AsyncOrCallback onLogin) → void
inherited
onLogout(AsyncOrCallback onLogout) → void
inherited
onShutdown(_AsyncCallback callback) → void
inherited
onStartup(_AsyncCallback callback) → void
inherited
recordStream(KType recordId, {bool immediate = true}) Stream<RType?>?
@param: immediate Whether you want this stream to include the current value. If false, only updates will be streamed.
refreshRecord(KType recordId) Future<RType>?
registerDisposer(FutureOr dispose()) → void
inherited
registerLoginHooks(IAuthState authState) → void
inherited
removeDisposer(FutureOr dispose()) → void
inherited
toString() String
A string representation of this object.
inherited
tryGet(KType recordId) → RType?
tryGetService(KType recordId) DataService<RType>?
tryRefreshRecord(KType recordId) Future<RType>?
updateRecord(KType id, Future update(RType? record), {bool silent = false}) Future

Operators

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