StreamFirebaseDoc<T> constructor

StreamFirebaseDoc<T>({
  1. required String path,
  2. required T parse(
    1. RawMap data
    ),
  3. required void onChange(
    1. T? before,
    2. T? after
    ),
  4. bool cancleOnError(
    1. Object error
    )?,
})

Implementation

StreamFirebaseDoc({
  required this.path,
  required this.parse,
  required this.onChange,
  this.cancleOnError,
}) {
  cancle = firestoreInstance
      .doc(path)
      .snapshots()
      .handleError(_onError)
      .listen(_listen, cancelOnError: false)
      .cancel;
}