Snapshot<T> constructor

Snapshot<T>({
  1. required Query query,
  2. Stream<T>? rootStream,
  3. StreamController? controller,
  4. void closeConnection(
    1. Snapshot
    )?,
  5. T? defaultValue,
  6. void changeVariablesF(
    1. Snapshot
    )?,
})

Class Snapshot constructor

Implementation

Snapshot({
  required Query query,
  Stream<T>? rootStream,
  StreamController? controller,
  this.closeConnection,
  T? defaultValue,
  this.changeVariablesF,
}) {
  _wrapper.value = defaultValue;
  _query = query;
  _controller = controller ?? StreamController.broadcast();
  _rootStream = rootStream ??
      _controller.stream.transform(StartWithStreamTransformer<T>(_wrapper));
}