addViolation method

void addViolation({
  1. required dynamic value,
  2. required String fieldName,
  3. required String message,
})

Add a fully customizable violation

Implementation

void addViolation({
  required dynamic value,
  required String fieldName,
  required String message,
}) {
  constrainViolations.add(
    ConstrainViolation(
      value: value,
      fieldName: fieldName,
      message: message,
    ),
  );
}