SnapshotStreamX extension
Methods
-
as<
T> ({String? format}) → Stream< T> - Returns a stream where each snapshot is converted to an object of type T.
-
asList<
T> ({String? format}) → Stream< List< T> ?> - Returns a stream where each snapshot is converted to a nullable list of objects of type T.
-
asMap<
T> ({String? format}) → Stream< Map< String, T> ?> - Returns a stream where each snapshot is converted to a nullable map with values of type T.
-
asNonNullableList<
T> ({String? format}) → Stream< List< T> > - Returns a stream where each snapshot is converted to a non-nullable list of objects of type T.
-
asNonNullableMap<
T> ({String? format}) → Stream< Map< String, T> > - Returns a stream where each snapshot is converted to a non-nullable map with values of type T.
-
asyncSetPath(
String path, Stream childStream) → Stream< Snapshot> -
Updates the content at
path
for each snapshot in this stream asynchronously with the values fromchildStream
-
child(
String path) → Stream< Snapshot> -
Takes the (grand)child defined by
path
of each Snapshot in this stream. -
mapChildren(
dynamic mapper(String key, Snapshot value)) → Stream< Snapshot> -
Updates the content of each child with the value returned by
mapper
-
mapPath(
String path, dynamic mapper(Snapshot value)) → Stream< Snapshot> -
recycle(
) → Stream< Snapshot> - Returns a snapshot stream where each new emitted snapshot reuses the cache of the previous snapshot with the same decoder.
-
setPath(
String path, dynamic value) → Stream< Snapshot> -
Updates the content at
path
for each snapshot in this stream. -
switchChildren(
Stream mapper(String key, Snapshot value)) → Stream< Snapshot> -
Updates the content of each child with the values of the stream returned
by
mapper
-
switchPath(
String path, Stream mapper(Snapshot snapshot)) → Stream< Snapshot> -
Updates the content at
path
for each snapshot in this stream asynchronously with the values from the stream returned by themapper
callback. -
withDecoder(
SnapshotDecoder decoder) → Stream< Snapshot> -
Returns a snapshot stream where each snapshot has the decoder
decoder
.