SourcePatchModel constructor

SourcePatchModel(
  1. int sourceId, {
  2. required int? priority,
  3. required bool? isIncluded,
})

At least one of the priority or isIncluded properties must be provided.

Throw Exception if at least one property isn't supplied.

Implementation

SourcePatchModel(this.sourceId, {required this.priority, required this.isIncluded}) {
  if (priority == null && isIncluded == null) throw Exception("At least one of priority or isIncluded must be provided");
}