docService<MODEL extends TModel<DTO> > method
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> readyDeps(- 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,
);