autoIdentify method
IdentifiedObject<T>
autoIdentify(
- T object, {
- T updateObjectWithId(
- T object,
- String id
override
Generates a unique ID for an object and returns an IdentifiedObject.
If updateObjectWithId is provided, the object is updated with the
generated ID.
If not provided, the object remains unchanged.
Implementation
@override
IdentifiedObject<T> autoIdentify(
T object, {
T Function(T object, String id)? updateObjectWithId,
}) {
return FirestoreIdentifiedObject(
object,
updateObjectWithId ?? (object, id) => object,
this,
);
}