mergeFromFirestore<T> function
A merge function for specifying how a server response from Firestore should be merged into the cache given the existing and incoming data.
Implementation
T? mergeFromFirestore<T>(
T? existing,
T? incoming,
NimbostratusFromFirestore<T>? fromFirestore,
) {
if (existing == null || fromFirestore == null) {
return incoming;
}
return fromFirestore(
existing,
incoming,
);
}