api method

TFirestoreApi<DTO> api({
  1. FirebaseFirestore? firebaseFirestore,
  2. GetOptions? getOptions,
  3. String path(
    1. String collectionName
    )?,
  4. TFirestoreLogger? logger,
  5. bool? isCollectionGroup,
  6. IFirestoreCacheService? firestoreCacheService,
  7. bool? forceCacheRefresh,
})

Implementation

TFirestoreApi<DTO> api({
  FirebaseFirestore? firebaseFirestore,
  GetOptions? getOptions,
  String Function(String collectionName)? path,
  TFirestoreLogger? logger,
  bool? isCollectionGroup,
  IFirestoreCacheService? firestoreCacheService,
  bool? forceCacheRefresh,
}) => TFirestoreApi<DTO>(
  firestoreCache: firestoreCacheService != null
      ? TFirestoreCache(
          firestoreCacheService: firestoreCacheService,
          forceCacheRefresh: forceCacheRefresh ?? this.forceCacheRefresh,
        )
      : null,
  userIdFieldName: userIdFieldName,
  defaultIdValue: defaultIdValue,
  unknownIdValue: unknownIdValue,
  collectionPath: () => path?.call(collectionName) ?? collectionName,
  createdAtFieldName: createdAtFieldName,
  documentReferenceFieldName: documentReferenceFieldName,
  firebaseFirestore: firebaseFirestore ?? FirebaseFirestore.instance,
  fromJson: fromJson,
  fromJsonError: fromJsonError,
  getOptions: getOptions,
  idFieldName: idFieldName,
  isCollectionGroup: isCollectionGroup ?? this.isCollectionGroup,
  logger: logger,
  toJson: toJson,
  tryAddLocalDocumentReference: tryAddLocalDocumentReference,
  tryAddLocalId: tryAddLocalId,
  updatedAtFieldName: updatedAtFieldName,
);