NimbostratusUpdateBatcher constructor
NimbostratusUpdateBatcher({
- required FirebaseFirestore firestore,
- required Map<
String, NimbostratusStateBloc> documents, - required Future<
NimbostratusDocumentSnapshot< update<T?> >T>( - DocumentReference<
T> ref, - T data, {
- NimbostratusWriteBatch? batch,
- NimbostratusFromFirestore<
T> ? fromFirestore, - bool isOptimistic,
- ToFirestore<
T> ? toFirestore, - WritePolicy writePolicy,
- DocumentReference<
- required Future<
NimbostratusDocumentSnapshot< modify<T?> >T>( - DocumentReference<
T> ref, - T modifyFn(
- T? currentValue
- NimbostratusWriteBatch? batch,
- NimbostratusFromFirestore<
T> ? fromFirestore, - bool isOptimistic,
- ToFirestore<
T> ? toFirestore, - WritePolicy writePolicy,
- DocumentReference<
Implementation
NimbostratusUpdateBatcher({
required FirebaseFirestore firestore,
required Map<String, NimbostratusStateBloc> documents,
required Future<NimbostratusDocumentSnapshot<T?>> Function<T>(
DocumentReference<T> ref,
T data, {
WritePolicy writePolicy,
ToFirestore<T>? toFirestore,
NimbostratusWriteBatch? batch,
bool isOptimistic,
NimbostratusFromFirestore<T>? fromFirestore,
})
update,
required Future<NimbostratusDocumentSnapshot<T?>> Function<T>(
DocumentReference<T> ref,
T Function(T? currentValue) modifyFn, {
WritePolicy writePolicy,
ToFirestore<T>? toFirestore,
NimbostratusWriteBatch? batch,
bool isOptimistic,
NimbostratusFromFirestore<T>? fromFirestore,
})
modify,
}) : _documents = documents,
_update = update,
_modify = modify,
_firestore = firestore,
_batch = NimbostratusWriteBatch(batch: firestore.batch());