child method

Stream<Snapshot> child(
  1. String path
)

Takes the (grand)child defined by path of each Snapshot in this stream.

Only distinct values are emitted.

When this stream implements EfficientChild.child, this implementation will be used instead of the default one. With EfficientChild, a new stream can be created that does not require the original stream to be listened to.

Implementation

Stream<Snapshot> child(String path) {
  if (this is EfficientChild) {
    return (this as EfficientChild).child(path);
  }

  return map((s) => s.child(path)).distinct();
}