SaveChangeSet constructor
SaveChangeSet({})
Creates a change set with optional details.
Implementation
SaveChangeSet({
this.added = const [],
this.updated = const [],
this.removed = const [],
this.note,
}) {
final hasNote = note != null && note!.isNotEmpty;
if (added.isEmpty && updated.isEmpty && removed.isEmpty && !hasNote) {
throw ArgumentError(
'ChangeSet must not be empty. '
'Use SaveChangeSet.none() or provide a note.',
);
}
}