SetOptions constructor
Creates a SetOptions instance.
Implementation
SetOptions({
this.merge,
List<Object>? mergeFields,
}) : assert(
(merge != null) ^ (mergeFields != null),
"options must provide either 'merge' or 'mergeFields'",
),
mergeFields = mergeFields?.map((field) {
assert(
field is String || field is FieldPath,
'[mergeFields] can only contain Strings or FieldPaths but got $field',
);
if (field is String) return FieldPath.fromString(field);
return field as FieldPath;
}).toList(growable: false);