docService<MODEL extends TModel<DTO>> method

TDocService<DTO, MODEL> docService<MODEL extends TModel<DTO>>({
  1. required TDocValueBuilderDef<DTO, MODEL> defaultValue,
  2. required TDocModelBuilderDef<DTO, MODEL> modelBuilder,
  3. TDocApiBuilderDef<DTO, MODEL>? apiBuilder,
  4. TDocStreamBuilderDef<DTO, MODEL>? streamBuilder,
  5. TDocValueBuilderDef<DTO, MODEL>? initialValue,
  6. IFirestoreCacheService? firestoreCacheService,
  7. ValueChanged<DTO?>? afterLocalNotifyUpdate,
  8. ValueChanged<DTO?>? beforeLocalNotifyUpdate,
  9. bool initialiseStream = TFirestoreApiDefaults.initialiseStream,
  10. TDocValueBuilderDef<DTO, MODEL>? onMissingRemoteValue,
  11. List<Future> readyDeps(
    1. User user
    )?,
})

Implementation

TDocService<DTO, MODEL> docService<MODEL extends TModel<DTO>>({
  required TDocValueBuilderDef<DTO, MODEL> defaultValue,
  required TDocModelBuilderDef<DTO, MODEL> modelBuilder,
  TDocApiBuilderDef<DTO, MODEL>? apiBuilder,
  TDocStreamBuilderDef<DTO, MODEL>? streamBuilder,
  TDocValueBuilderDef<DTO, MODEL>? initialValue,
  IFirestoreCacheService? firestoreCacheService,
  ValueChanged<DTO?>? afterLocalNotifyUpdate,
  ValueChanged<DTO?>? beforeLocalNotifyUpdate,
  bool initialiseStream = TFirestoreApiDefaults.initialiseStream,
  TDocValueBuilderDef<DTO, MODEL>? onMissingRemoteValue,
  List<Future> Function(User user)? readyDeps,
}) => TDocService<DTO, MODEL>(
  modelBuilder: modelBuilder,
  readyDeps: readyDeps,
  collection: this,
  firestoreCacheService: firestoreCacheService,
  afterLocalNotifyUpdate: afterLocalNotifyUpdate,
  beforeLocalNotifyUpdate: beforeLocalNotifyUpdate,
  apiBuilder: apiBuilder,
  defaultValue: defaultValue,
  initialValue: initialValue,
  streamBuilder: streamBuilder,
  initialiseStream: initialiseStream,
  onMissingRemoteValue: onMissingRemoteValue,
);