SubmissionRequirement constructor

SubmissionRequirement({
  1. required SubmissionRequirementRule rule,
  2. String? from,
  3. List<SubmissionRequirement>? fromNested,
  4. String? name,
  5. String? purpose,
  6. int? max,
  7. int? count,
  8. int? min,
})

Implementation

SubmissionRequirement(
    {required this.rule,
    this.from,
    this.fromNested,
    this.name,
    this.purpose,
    this.max,
    this.count,
    this.min}) {
  if (from == null && fromNested == null) {
    throw FormatException('Need either from or fromNested');
  }
  if (from != null && fromNested != null) {
    throw FormatException('Do nut use  from and fromNested together');
  }
}