serializeData<T> function
Implementation
Map<String, dynamic> serializeData<T>({
required T data,
required ToFirestore<T>? toFirestore,
}) {
if (data is Map<String, dynamic>) {
return data;
} else {
assert(
toFirestore != null,
'A toFirestore function must be provivded for converted-type server updates.',
);
return toFirestore!(data, null);
}
}